- LICENSE.TXT
variables:
-- template: /eng/common-variables.yml
+ - name: _TeamName
+ value: DotNetCore
+ - name: _InternalBuildArgs
+ value: ''
+
+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - name: _SignType
+ value: real
+ # DotNet-Diagnostics-SDL-Params provides Tsa* variables for SDL checks.
+ - group: DotNet-Diagnostics-SDL-Params
+ - name: _InternalBuildArgs
+ value: /p:DotNetSignType=$(_SignType)
+ /p:TeamName=$(_TeamName)
+ /p:DotNetPublishUsingPipelines=$(PublishPackages)
+ /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
stages:
- stage: build
- template: /eng/common/templates/job/job.yml
parameters:
name: Sign_Package_Publish
- displayName: Sign, Package, and Publish to BAR
+ displayName: Sign, Package, and Generate BAR Manifests
dependsOn:
- Windows
- CentOS_7
set __ThisScriptDir="%~dp0"
call "%__ThisScriptDir%"\setup-vs-tools.cmd
-if NOT '%ERRORLEVEL%' == '0' exit /b 1
+if NOT '%ERRORLEVEL%' == '0' goto ExitWithError
if defined VS160COMNTOOLS (
set "__VSToolsRoot=%VS160COMNTOOLS%"
set __DotNetCli=%__ProjectDir%\.dotnet\dotnet.exe
if not exist "%__DotNetCli%" (
echo %__MsgPrefix%Assertion failed: dotnet cli not found at path "%__DotNetCli%"
- exit /b 1
+ goto ExitWithError
)
REM =========================================================================================
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" "%__ProjectDir%\eng\CreateVersionFile.csproj" /bl:!__GenerateVersionLog! /t:GenerateVersionFiles /restore /p:FileVersionFile=%__RootBinDir%\bin\FileVersion.txt /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile=%__CrossCompIntermediatesDir%\_version.h %__CommonBuildArgs%
if not !errorlevel! == 0 (
echo Generate Version Header FAILED
- exit /b 1
+ goto ExitWithError
)
if defined __SkipConfigure goto SkipConfigureCrossBuild
:SkipConfigureCrossBuild
if not exist "%__CrossCompIntermediatesDir%\install.vcxproj" (
echo %__MsgPrefix%Error: failed to generate cross-arch components build project!
- exit /b 1
+ goto ExitWithError
)
if defined __ConfigureOnly goto SkipCrossCompBuild
if not !ERRORLEVEL! == 0 (
echo %__MsgPrefix%Error: cross-arch components build failed. Refer to the build log files for details:
echo !__BuildLog!
- exit /b 1
+ goto ExitWithError
)
:SkipCrossCompBuild
if not defined VSINSTALLDIR (
echo %__MsgPrefix%Error: VSINSTALLDIR variable not defined.
- exit /b 1
+ goto ExitWithError
)
echo Generating Version Header
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" "%__ProjectDir%\eng\CreateVersionFile.csproj" /bl:!__GenerateVersionLog! /t:GenerateVersionFiles /restore /p:FileVersionFile=%__RootBinDir%\bin\FileVersion.txt /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile=%__IntermediatesDir%\_version.h %__CommonBuildArgs%
if not !errorlevel! == 0 (
echo Generate Version Header FAILED
- exit /b 1
+ goto ExitWithError
)
if defined __SkipConfigure goto SkipConfigure
if not exist "%__IntermediatesDir%\install.vcxproj" (
echo %__MsgPrefix%Error: failed to generate native component build project!
- exit /b 1
+ goto ExitWithError
)
set __BuildLog="%__LogDir%\Native.Build.binlog"
if not !ERRORLEVEL! == 0 (
echo %__MsgPrefix%Error: native component build failed. Refer to the build log files for details:
echo !__BuildLog!
- exit /b 1
+ goto ExitWithError
)
:SkipNativeBuild
exit /b 0
+REM =========================================================================================
+REM === These two routines are intended for the exit code to propagate to the parent process
+REM === Like MSBuild or Powershell. If we directly goto ExitWithError from within a if statement in
+REM === any of the routines, the exit code is not propagated due to quirks of nested conditonals
+REM === in delayed expansion scripts.
+REM =========================================================================================
+:ExitWithError
+exit /b 1
+
+:ExitWithCode
+exit /b !__exitCode!
+
REM =========================================================================================
REM ===
REM === Helper routines
echo -architecture <x64|x86|arm|arm64>
echo -configuration <debug|release>
echo -verbosity <q[uiet]|m[inimal]|n[ormal]|d[etailed]|diag[nostic]>
-exit /b 1
+goto ExitWithError
+++ /dev/null
-
-variables:
- - name: _TeamName
- value: DotNetCore
- - name: _DotNetArtifactsCategory
- value: .NETCore
- - name: _InternalBuildArgs
- value: ''
-
- - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- - name: _SignType
- value: real
- - name: _PublishBlobFeedUrl
- value: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
- # DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
- # DotNet-Diagnostics-SDL-Params provides Tsa* variables for SDL checks.
- # DotNet-Symbol-Server-Pats provides: provides microsoft-symbol-server-pat and symweb-symbol-server-pat
- # Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
- - group: DotNet-Blob-Feed
- - group: DotNet-Diagnostics-SDL-Params
- - group: DotNet-Symbol-Server-Pats
- - group: Publish-Build-Assets
- - name: _InternalBuildArgs
- value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
- /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
- /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
- /p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)
- /p:DotNetPublishToBlobFeed=$(PublishPackages)
- /p:DotNetPublishUsingPipelines=$(PublishPackages)
- /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
- /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
- /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
+
+ <!-- Work around https://github.com/dotnet/sourcelink/issues/572
+ Remove once we build using an SDK that contains https://github.com/dotnet/sdk/pull/10613 -->
+ <PropertyGroup>
+ <TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
+ </PropertyGroup>
+ <ItemGroup>
+ <EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
+ </ItemGroup>
- <!-- Remove this once arcade version is bumped -->
+ <!-- We need this for the binplacing for testing assets.
+ This should be removed at some point as it's brittle (harcodes versions and creates native-managed coupling). -->
<Target Name="_PublishPackageReferences"
AfterTargets="PostBuildEvent"
- Condition="$(IsPublishable) == 'true'"
+ Condition="$(NeedsPublishing) == 'true'"
DependsOnTargets="$(_BeforePublishNoBuildTargets);$(_CorePublishTargets)" />
</Project>
<PackageReleaseNotes>$(Description)</PackageReleaseNotes>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IncludeSymbols>true</IncludeSymbols>
- <IsShippingAssembly>true</IsShippingAssembly>
+ <IsShippingPackage>false</IsShippingPackage>
</PropertyGroup>
<ItemGroup>
<PackageReleaseNotes>$(Description)</PackageReleaseNotes>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IncludeSymbols>true</IncludeSymbols>
- <IsShippingAssembly>true</IsShippingAssembly>
+ <IsShipping>true</IsShipping>
</PropertyGroup>
</Project>
<PackageReleaseNotes>$(Description)</PackageReleaseNotes>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IncludeSymbols>true</IncludeSymbols>
- <IsShippingAssembly>true</IsShippingAssembly>
+ <IsShippingPackage>false</IsShippingPackage>
</PropertyGroup>
<ItemGroup>
<PackageReleaseNotes>$(Description)</PackageReleaseNotes>
<PackageTags>tests</PackageTags>
<IncludeSymbols>true</IncludeSymbols>
- <IsShippingAssembly>true</IsShippingAssembly>
+ <IsShipping>false</IsShipping>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>SOS.NETCore</AssemblyName>
+ <NeedsPublishing>true</NeedsPublishing>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>;1591;1701</NoWarn>
<Description>.NET Core SOS</Description>
- <IsShippingAssembly>true</IsShippingAssembly>
+ <IsShippingPackage>false</IsShippingPackage>
</PropertyGroup>
<ItemGroup>
<SOSPackagePathPrefix>tools</SOSPackagePathPrefix>
<GalleryManifestName>$(ArtifactsPackagesDir)\GalleryManifest.xml</GalleryManifestName>
<BeforePack>GenerateGalleryZip;GenerateSymbolsZip</BeforePack>
+ <IsShippingPackage>false</IsShippingPackage>
</PropertyGroup>
<ItemGroup>
<Option>
<TestName>SOS.DualRuntimes</TestName>
<!-- The assembly path, class and function name of the desktop test code to load/run -->
- <DesktopTestParameters>$(RootBinDir)\bin\SymbolTestDll\$(TargetConfiguration)\$(DesktopFramework)\publish\SymbolTestDll.dll SymbolTestDll.TestClass ThrowException</DesktopTestParameters>
+ <DesktopTestParameters>$(RootBinDir)\bin\SymbolTestDll\$(TargetConfiguration)\$(DesktopFramework)\SymbolTestDll.dll SymbolTestDll.TestClass ThrowException</DesktopTestParameters>
</Option>
</Options>
<Options>
<IsPackable>false</IsPackable>
<NoWarn>;1591;1701</NoWarn>
<DefineConstants>$(DefineConstants);CORE_CLR</DefineConstants>
+ <NeedsPublishing>true</NeedsPublishing>
</PropertyGroup>
<ItemGroup>
<PackAsToolShimRuntimeIdentifiers>win-x64;win-x86;win-arm;osx-x64</PackAsToolShimRuntimeIdentifiers>
<PackagedShimOutputRootDirectory>$(OutputPath)</PackagedShimOutputRootDirectory>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
+ <IsShipping>true</IsShipping>
</PropertyGroup>
</Project>
<RootNamespace>Microsoft.Diagnostic.Tools.Dump</RootNamespace>
<Description>Diagnostic dump collect and analyze tool</Description>
<PackageTags>Diagnostic</PackageTags>
+ <NeedsPublishing>true</NeedsPublishing>
<PackageReleaseNotes>$(Description)</PackageReleaseNotes>
<SOSPackagePathPrefix>tools/$(TargetFramework)/any</SOSPackagePathPrefix>
</PropertyGroup>