Commit last repo template changes

This commit is contained in:
Rob Mensching 2021-10-17 16:56:33 -07:00
Родитель edcf9e5955
Коммит b0e2645ddb
9 изменённых файлов: 105 добавлений и 59 удалений

Просмотреть файл

@ -21,6 +21,8 @@ environment:
build_script:
- appveyor.cmd
test: off
pull_requests:
do_not_increment_build_number: true

Просмотреть файл

@ -0,0 +1,13 @@
{
"SignClient": {
"AzureAd": {
"AADInstance": "https://login.microsoftonline.com/",
"ClientId": "c248d68a-ba6f-4aa9-8a68-71fe872063f8",
"TenantId": "16076fdc-fcc1-4a15-b1ca-32c9a255900e"
},
"Service": {
"Url": "https://codesign.dotnetfoundation.org/",
"ResourceId": "https://SignService/3c30251f-36f3-490b-a955-520addb85001"
}
}
}

Просмотреть файл

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Customized Microsoft Native Recommended Rules" Description="Microsoft Native Recommended Rules, -C26812" ToolsVersion="16.0">
<Include Path="nativerecommendedrules.ruleset" Action="Default" />
<Rules AnalyzerId="Microsoft.Analyzers.NativeCodeAnalysis" RuleNamespace="Microsoft.Rules.Native">
<!-- We need C style enums since we support BAs written in C -->
<Rule Id="C26812" Action="None" />
</Rules>
</RuleSet>

Просмотреть файл

@ -8,7 +8,6 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink>
<MSBuildWarningsAsMessages>MSB3246</MSBuildWarningsAsMessages>
<ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
<BaseOutputPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\))</BaseOutputPath>

Просмотреть файл

@ -4,47 +4,69 @@
Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.Build.targets
then update all of the repos.
-->
<!--
Replace PackageReferences with ProjectReferences when the projects can be found in .sln.
See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284
-->
<Project>
<PropertyGroup>
<ReplacePackageReferences>true</ReplacePackageReferences>
<TheSolutionPath Condition=" '$(NCrunch)'=='' ">$(SolutionPath)</TheSolutionPath>
<TheSolutionPath Condition=" '$(NCrunch)'=='1' ">$(NCrunchOriginalSolutionPath)</TheSolutionPath>
<SigningToolFolder>$(BaseOutputPath)obj\.tools</SigningToolFolder>
<SigningToolExe>$(SigningToolFolder)\SignClient.exe</SigningToolExe>
<SigningFilelist>$(SigningToolFolder)\empty-filelist.txt</SigningFilelist>
<SigningConfiguration>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), signing.json))\signing.json</SigningConfiguration>
</PropertyGroup>
<Choose>
<When Condition="$(ReplacePackageReferences) AND '$(TheSolutionPath)' != '' AND '$(TheSolutionPath)' != '*undefined*' AND Exists('$(TheSolutionPath)')">
<PropertyGroup>
<CreateDocumentation Condition=" '$(CreateDocumentationFile)'!='true' ">false</CreateDocumentation>
<DocumentationFile Condition=" '$(CreateDocumentationFile)'=='true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<SolutionFileContent>$([System.IO.File]::ReadAllText($(TheSolutionPath)))</SolutionFileContent>
<SmartSolutionDir>$([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) ))</SmartSolutionDir>
<RegexPattern>(?&lt;="[PackageName]", ")(.*)(?=", ")</RegexPattern>
</PropertyGroup>
<Target Name="SetNuspecProperties" DependsOnTargets="InitializeSourceControlInformation" AfterTargets="GetBuildVersion"
Condition=" Exists('$(MSBuildProjectName).nuspec') ">
<PropertyGroup>
<ProjectUrl Condition=" '$(ProjectUrl)'=='' and '$(PrivateRepositoryUrl)'!='' ">$(PrivateRepositoryUrl.Replace('.git',''))</ProjectUrl>
<ItemGroup>
<!-- Keep the identity of the PackageReference -->
<SmartPackageReference Include="@(PackageReference)">
<PackageName>%(Identity)</PackageName>
<InSolution>$(SolutionFileContent.Contains('\%(Identity).csproj'))</InSolution>
</SmartPackageReference>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
<NuspecBasePath Condition=" '$(NuspecBasePath)'=='' ">$(MSBuildProjectDirectory)</NuspecBasePath>
<NuspecProperties>$(NuspecProperties);Id=$(PackageId);Authors="$(Authors)";Configuration=$(Configuration);Copyright="$(Copyright)";Description="$(Description)";Title="$(Title)"</NuspecProperties>
<NuspecProperties>$(NuspecProperties);Version=$(NPMPackageVersion);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl)</NuspecProperties>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
</Target>
<!-- Filter them by mapping them to another ItemGroup using the WithMetadataValue item function -->
<PackageInSolution Include="@(SmartPackageReference->WithMetadataValue('InSolution', True))">
<Pattern>$(RegexPattern.Replace('[PackageName]','%(PackageName)') )</Pattern>
<SmartPath>$([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)'))</SmartPath>
</PackageInSolution>
<Target Name="PackNative" DependsOnTargets="GetBuildVersion;SetNuspecProperties"
Condition=" Exists('$(MSBuildProjectName).nuspec') ">
<ProjectReference Include="@(PackageInSolution->'$(SmartSolutionDir)\%(SmartPath)' )"/>
<Exec Command='nuget pack $(NuspecFile) -OutputDirectory "$(BaseOutputPath)$(Configuration)" -BasePath "$(NuspecBasePath)" -Properties $(NuspecProperties)'
WorkingDirectory="$(MSBuildProjectDirectory)" />
<!-- Remove the package references that are now referenced as projects -->
<PackageReference Remove="@(PackageInSolution->'%(PackageName)')"/>
</ItemGroup>
<ItemGroup>
<NuGetPackOutput Include="$(BaseOutputPath)$(Configuration)\**\$(PackageId)*.nupkg" />
</ItemGroup>
</Target>
</When>
</Choose>
<Target Name="_GetSignClient"
Condition=" !Exists('$(SigningToolExe)') ">
<WriteLinesToFile File='$(SigningFilelist)' Lines='do-not-sign-files-in-nupkg' Overwrite='true' />
<Exec Command='dotnet.exe tool install --tool-path "$(SigningToolFolder)" SignClient' />
</Target>
<Target Name="SignOutput" DependsOnTargets="_GetSignClient" AfterTargets="AfterBuild"
Condition=" '$(SigningUser)'!='' and '$(SignOutput)'!='false' and
('$(MSBuildProjectExtension)'=='.csproj' or ('$(MSBuildProjectExtension)'=='.vcxproj' and '$(ConfigurationType)'!='StaticLibrary'))">
<Exec Command='"$(SigningToolExe)" sign -i $(TargetPath) -c "$(SigningConfiguration)" -n "WiX Toolset" -d "WiX Toolset" -u https://wixtoolset.org/ -r "$(SigningUser)" -s "$(SigningSecret)"'
WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" />
</Target>
<Target Name="SignNupkg" DependsOnTargets="_GetSignClient" AfterTargets="Pack;PackNative"
Condition=" '$(SigningUser)'!='' and '@(NuGetPackOutput)'!='' and '$(SignNupkg)'!='false' ">
<ItemGroup>
<SigningNupkgs Include="@(NuGetPackOutput)" Condition=" '%(Extension)'=='.nupkg' " />
</ItemGroup>
<Exec Command='"$(SigningToolExe)" sign -i "@(SigningNupkgs->&apos;%(Identity)&apos;)" -c "$(SigningConfiguration)" -f "$(SigningFilelist)" -n "WiX Toolset" -d "WiX Toolset" -u https://wixtoolset.org/ -r "$(SigningUser)" -s "$(SigningSecret)"'
WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" />
</Target>
<Import Project="Directory$(MSBuildProjectExtension).targets" Condition=" Exists('Directory$(MSBuildProjectExtension).targets') " />
<Import Project="Custom.Build.targets" Condition=" Exists('Custom.Build.targets') " />

Просмотреть файл

@ -1,26 +0,0 @@
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
<!--
Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.csproj.targets
then update all of the repos.
-->
<Project>
<PropertyGroup>
<CreateDocumentation Condition=" '$(CreateDocumentationFile)'!='true' ">false</CreateDocumentation>
<DocumentationFile Condition=" '$(CreateDocumentationFile)'=='true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<Target Name="SetNuspecProperties" DependsOnTargets="InitializeSourceControlInformation" AfterTargets="GetBuildVersion"
Condition=" Exists('$(MSBuildProjectName).nuspec') ">
<PropertyGroup>
<ProjectUrl Condition=" '$(ProjectUrl)'=='' and '$(PrivateRepositoryUrl)'!='' ">$(PrivateRepositoryUrl.Replace('.git',''))</ProjectUrl>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
<NuspecBasePath Condition=" '$(NuspecBasePath)'=='' ">$(OutputPath)..\</NuspecBasePath>
<NuspecProperties>$(NuspecProperties);Id=$(PackageId);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);Title=$(Title)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);Version=$(PackageVersion);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl)</NuspecProperties>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
</Target>
</Project>

Просмотреть файл

@ -19,17 +19,22 @@
<WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
</PropertyGroup>
<PropertyGroup>
<CodeAnalysisRuleSet Condition=" Exists('$(MSBuildThisFileDirectory)CustomizedNativeRecommendedRules.ruleset') ">$(MSBuildThisFileDirectory)CustomizedNativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
<WarningLevel>Level4</WarningLevel>
<AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0600;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
<CallingConvention Condition="'$(Platform)'=='Win32'">StdCall</CallingConvention>
<TreatWarningAsError>true</TreatWarningAsError>
<ExceptionHandling>false</ExceptionHandling>
<ControlFlowGuard>Guard</ControlFlowGuard>
<AdditionalOptions>-YlprecompDefine</AdditionalOptions>
<AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) &gt; 4 ">true</MultiProcessorCompilation>
@ -79,6 +84,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
<ClCompile>
<ControlFlowGuard></ControlFlowGuard>
<BasicRuntimeChecks></BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
</ClCompile>
@ -98,6 +104,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
<ClCompile>
<ControlFlowGuard></ControlFlowGuard>
<BasicRuntimeChecks></BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
</ClCompile>

Просмотреть файл

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
<Project>
<!-- Overrides the standard Cpp.Build.props to include the PlatformToolset in the output path. -->
<PropertyGroup>
<IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformToolset)\$(PlatformTarget)\</IntDir>
<OutDir>$(OutputPath)$(PlatformToolset)\$(PlatformTarget)\</OutDir>
</PropertyGroup>
</Project>

Просмотреть файл

@ -0,0 +1,11 @@
{
"version": "4.0.0-preview.0-build.{height}",
"publicReleaseRefSpec": [
"^refs/heads/master$"
],
"cloudBuild": {
"buildNumber": {
"enabled": true
}
}
}