From dbcd83075c278d518d4b786872fd0a127e6eef22 Mon Sep 17 00:00:00 2001 From: John Beisner Date: Tue, 13 Mar 2018 08:19:15 -0700 Subject: [PATCH] Creating and publishing 'symbols.nuget' to the blob feed. (#8712) * Creating and publishing '*.symbols.nuget' to the blob feed. * Reverting 'generatenupkg' methodology. * Fixing formatting... * Overwrite should = 'false' * Second draft - Creating and publishing '*.symbols.nuget' to the blob feed. * Fixing a VS auto-update. * Removing the 'Microsoft.SymbolUploader.Build.Task' modifications; need to make a PR just for this. * Change "sdk.*.Microsoft.DotNet.SDK.*.symbols.nupkg" to "runtime.*.Microsoft.DotNet.SDK.*.symbols.nupkg"; removing the 'DotNetRestore' on the Symbols.csproj * Removing a 'todo' comment... * Putting back the 'dotnet restore' * Fixing a typo... * Logical separation of the 'nupkg' from the 'symbols.nupkg' enumeration; fixed 'swr' pattern. * Add "BLOBFEED_STORAGE_CONTAINER" --- build/AzureInfo.props | 4 ++- build/Branding.props | 3 -- build/NugetConfigFile.targets | 1 - build/Package.targets | 4 ++- build/Publish.targets | 9 +++-- build/package/Installer.MSI.targets | 4 +-- build/package/Layout.targets | 15 -------- build/package/Nupkg.targets | 5 ++- build/package/Symbols.csproj | 17 ++++++++++ build/package/Symbols.targets | 29 ++++++++++++++++ build/publish/PublishNupkgToBlobFeed.targets | 34 ++++++++++++++----- build_projects/dotnet-cli-build/DotNetPack.cs | 21 +++++++++--- scripts/dockerrun.sh | 1 + ...crosoft.DotNet.InternalAbstractions.csproj | 2 +- src/redist/redist.csproj | 3 +- 15 files changed, 110 insertions(+), 42 deletions(-) create mode 100644 build/package/Symbols.csproj create mode 100644 build/package/Symbols.targets diff --git a/build/AzureInfo.props b/build/AzureInfo.props index 6e1739c62..c0f74875d 100644 --- a/build/AzureInfo.props +++ b/build/AzureInfo.props @@ -35,8 +35,10 @@ https://$(ChecksumCloudDropAccountName).blob.core.windows.net/$(ChecksumContainerName)/index.json + $(BLOBFEED_STORAGE_CONTAINER) + dotnet-core $(PB_PublishBlobFeedUrl) - https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + https://dotnetfeed.blob.core.windows.net/$(BlobFeedContainerName)/index.json $(PB_PublishBlobFeedKey) $(BLOBFEED_STORAGE_KEY) diff --git a/build/Branding.props b/build/Branding.props index eadbd0927..b34946abf 100644 --- a/build/Branding.props +++ b/build/Branding.props @@ -27,14 +27,11 @@ $(Architecture) dotnet-sdk-internal - dotnet-sdk-symbols dotnet-sdk $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-langpack $(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid) dotnet-standard-support-vs2015-$(SdkVersion)-$(ProductMonikerRid) - - $(ArtifactNameSdkSymbols)-$(SdkVersion)-$(ProductMonikerRid) $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid) $(ArtifactNameSdkLanguagePack)-$(SdkVersion)-$(ProductMonikerRid) $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)- diff --git a/build/NugetConfigFile.targets b/build/NugetConfigFile.targets index f8b41839b..ae70bac8f 100644 --- a/build/NugetConfigFile.targets +++ b/build/NugetConfigFile.targets @@ -22,7 +22,6 @@ - diff --git a/build/Package.targets b/build/Package.targets index eef514f56..c9c391839 100644 --- a/build/Package.targets +++ b/build/Package.targets @@ -1,6 +1,7 @@ + @@ -18,10 +19,11 @@ Init; Layout; GenerateNugetPackages; + GenerateSymbolsNugetPackages; GenerateArchives; GenerateInstallers" /> - \ No newline at end of file + diff --git a/build/Publish.targets b/build/Publish.targets index d64388410..053aaebfb 100644 --- a/build/Publish.targets +++ b/build/Publish.targets @@ -43,12 +43,17 @@ Condition=" '$(PublishNativeInstallers)' == 'true' "/> - + + + + diff --git a/build/package/Installer.MSI.targets b/build/package/Installer.MSI.targets index cd550e5a4..22d6adf38 100644 --- a/build/package/Installer.MSI.targets +++ b/build/package/Installer.MSI.targets @@ -174,7 +174,7 @@ - + - $(LayoutDirectory)/$(ArtifactNameSdkSymbols) $(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk) $(LayoutDirectory)/$(ArtifactNameSdkLanguagePack) *.resources.dll @@ -12,7 +11,6 @@ - @@ -29,12 +27,6 @@ Path2="%(SdkLayoutInput.Identity)" > - - - @@ -71,13 +63,6 @@ $(ArtifactNameSdk) - - @(SdkSymbolsLayoutInput) - @(SdkSymbolsRelativeOutputFiles -> '$(SdkSymbolsLayoutOutputDirectory)/%(Identity)') - $(ArtifactNameWithVersionSdkSymbols) - $(ArtifactNameSdkSymbols) - - @(CombinedHostHostFxrFrameworkSdkInput) @(CombinedHostHostFxrFrameworkSdkRelativeOutputFiles -> '$(CombinedHostHostFxrFrameworkSdkOutputDirectory)/%(Identity)') diff --git a/build/package/Nupkg.targets b/build/package/Nupkg.targets index d7287c8b7..4de692692 100644 --- a/build/package/Nupkg.targets +++ b/build/package/Nupkg.targets @@ -1,5 +1,5 @@ - + $(CompilationDirectory)/forPackaging @@ -10,10 +10,12 @@ Microsoft.DotNet.Cli.Utils $(SdkNugetVersion) + False Microsoft.DotNet.MSBuildSdkResolver $(SdkNugetVersion) + True @@ -22,6 +24,7 @@ DependsOnTargets="Init; SetupProjectsToPack"> + + + + netcoreapp1.0 + false + true + false + + $(SymbolsNupkgPackageId) + $(SdkVersion) + + + + + + diff --git a/build/package/Symbols.targets b/build/package/Symbols.targets new file mode 100644 index 000000000..d85180233 --- /dev/null +++ b/build/package/Symbols.targets @@ -0,0 +1,29 @@ + + + + $(MSBuildThisFileDirectory)/Symbols.csproj + runtime.$(ProductMonikerRid).Microsoft.DotNet.SDK + + + + + + + + + + + + + + + + diff --git a/build/publish/PublishNupkgToBlobFeed.targets b/build/publish/PublishNupkgToBlobFeed.targets index 1aff7da65..71f3d5371 100644 --- a/build/publish/PublishNupkgToBlobFeed.targets +++ b/build/publish/PublishNupkgToBlobFeed.targets @@ -1,27 +1,43 @@ - - - - NonShipping=true - - + + + + + NonShipping=true + + - + + + + + + + + + + + diff --git a/build_projects/dotnet-cli-build/DotNetPack.cs b/build_projects/dotnet-cli-build/DotNetPack.cs index bf4bef93d..71752805e 100644 --- a/build_projects/dotnet-cli-build/DotNetPack.cs +++ b/build_projects/dotnet-cli-build/DotNetPack.cs @@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build protected override string Args { - get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {MsbuildArgs}"; } + get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {GetIncludeSymbols()} {MsbuildArgs}"; } } public string Configuration { get; set; } @@ -26,9 +26,11 @@ namespace Microsoft.DotNet.Cli.Build public string ProjectPath { get; set; } public string VersionSuffix { get; set; } - + public string Runtime { get; set; } + public bool IncludeSymbols { get; set; } + private string GetConfiguration() { if (!string.IsNullOrEmpty(Configuration)) @@ -48,7 +50,7 @@ namespace Microsoft.DotNet.Cli.Build return null; } - + private string GetOutput() { if (!string.IsNullOrEmpty(Output)) @@ -78,7 +80,7 @@ namespace Microsoft.DotNet.Cli.Build return null; } - + private string GetRuntime() { if (!string.IsNullOrEmpty(Runtime)) @@ -88,5 +90,16 @@ namespace Microsoft.DotNet.Cli.Build return null; } + + private string GetIncludeSymbols() + { + if (IncludeSymbols) + { + return $"--include-symbols"; + } + + return null; + } + } } diff --git a/scripts/dockerrun.sh b/scripts/dockerrun.sh index 1b96a5021..1ffd92ee6 100755 --- a/scripts/dockerrun.sh +++ b/scripts/dockerrun.sh @@ -128,6 +128,7 @@ docker run $INTERACTIVE -t --rm --sig-proxy=true \ -e ARTIFACT_STORAGE_CONTAINER \ -e CHECKSUM_STORAGE_ACCOUNT \ -e CHECKSUM_STORAGE_CONTAINER \ + -e BLOBFEED_STORAGE_CONTAINER \ -e CLIBUILD_SKIP_TESTS \ -e COMMITCOUNT \ -e DROPSUFFIX \ diff --git a/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj b/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj index c4c930565..27ae6e2cb 100644 --- a/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj +++ b/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj @@ -2,7 +2,7 @@ Abstractions for making code that uses file system and environment testable. - 2.0.0-beta + $(SdkVersion) netstandard1.3 true true diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index c5e7c93aa..17cf424c7 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -315,8 +315,7 @@ + AfterTargets="CrossgenPublishDir">