diff --git a/build/Branding.props b/build/Branding.props
index 9a66fdc2d..7b126782e 100644
--- a/build/Branding.props
+++ b/build/Branding.props
@@ -21,14 +21,14 @@
$(HostOSName)-$(Architecture)
dotnet-sdk-internal
- dotnet-sdk-debug
+ dotnet-sdk-symbols
dotnet-sdk
$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-langpack
$(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid)
dotnet-standard-support-vs2015-$(SdkVersion)-$(ProductMonikerRid)
- $(ArtifactNameSdkDebug)-$(SdkVersion)-$(ProductMonikerRid)
+ $(ArtifactNameSdkSymbols)-$(SdkVersion)-$(ProductMonikerRid)
$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid)
$(ArtifactNameSdkLanguagePack)-$(SdkVersion)-$(ProductMonikerRid)
$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(HostMonikerRid)
diff --git a/build/package/Layout.targets b/build/package/Layout.targets
index 8d37a5b36..4c14f6ee3 100644
--- a/build/package/Layout.targets
+++ b/build/package/Layout.targets
@@ -1,7 +1,7 @@
- $(LayoutDirectory)/$(ArtifactNameSdkDebug)
+ $(LayoutDirectory)/$(ArtifactNameSdkSymbols)
$(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk)
$(LayoutDirectory)/$(ArtifactNameSdkLanguagePack)
*.resources.dll
@@ -12,7 +12,7 @@
-
+
@@ -30,9 +30,10 @@
-
+ Condition="'$(SeparateSymbolsArchive)' != 'false'"
+ Path1="$(SymbolsDirectory)/"
+ Path2="%(SdkSymbolsLayoutInput.Identity)" >
+
$(ArtifactNameSdk)
-
- @(SdkDebugLayoutInput)
- @(SdkDebugRelativeOutputFiles -> '$(SdkDebugLayoutOutputDirectory)/%(Identity)')
- $(ArtifactNameWithVersionSdkDebug)
- $(ArtifactNameSdkDebug)
+
+ @(SdkSymbolsLayoutInput)
+ @(SdkSymbolsRelativeOutputFiles -> '$(SdkSymbolsLayoutOutputDirectory)/%(Identity)')
+ $(ArtifactNameWithVersionSdkSymbols)
+ $(ArtifactNameSdkSymbols)
diff --git a/build_projects/dotnet-cli-build/Crossgen.cs b/build_projects/dotnet-cli-build/Crossgen.cs
index 68129a065..48ebdebfa 100644
--- a/build_projects/dotnet-cli-build/Crossgen.cs
+++ b/build_projects/dotnet-cli-build/Crossgen.cs
@@ -3,7 +3,9 @@
// See the LICENSE file in the project root for more information.
using System;
+using System.Diagnostics;
using System.IO;
+using System.Runtime.InteropServices;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
@@ -22,12 +24,18 @@ namespace Microsoft.DotNet.Build.Tasks
public string CrossgenPath { get; set; }
+ public bool CreateSymbols { get; set; }
+
+ public string DiasymReaderPath { get; set; }
+
public bool ReadyToRun { get; set; }
public ITaskItem[] PlatformAssemblyPaths { get; set; }
private string TempOutputPath { get; set; }
+ private bool _secondInvocationToCreateSymbols;
+
protected override bool ValidateParameters()
{
base.ValidateParameters();
@@ -58,6 +66,12 @@ namespace Microsoft.DotNet.Build.Tasks
File.Delete(TempOutputPath);
}
+ if (toolResult && CreateSymbols)
+ {
+ _secondInvocationToCreateSymbols = true;
+ toolResult = base.Execute();
+ }
+
return toolResult;
}
@@ -83,9 +97,30 @@ namespace Microsoft.DotNet.Build.Tasks
protected override string GenerateCommandLineCommands()
{
+ if (_secondInvocationToCreateSymbols)
+ {
+ return $"{GetReadyToRun()} {GetPlatformAssemblyPaths()} {GetDiasymReaderPath()} {GetCreateSymbols()}";
+ }
+
return $"{GetReadyToRun()} {GetInPath()} {GetOutPath()} {GetPlatformAssemblyPaths()} {GetJitPath()}";
}
+ private string GetCreateSymbols()
+ {
+ var option = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "-createpdb" : "-createperfmap";
+ return $"{option} \"{Path.GetDirectoryName(DestinationPath)}\" \"{DestinationPath}\"";
+ }
+
+ private string GetDiasymReaderPath()
+ {
+ if (string.IsNullOrEmpty(DiasymReaderPath))
+ {
+ return null;
+ }
+
+ return $"-diasymreaderpath \"{DiasymReaderPath}\"";
+ }
+
private string GetReadyToRun()
{
if (ReadyToRun)
diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj
index c45cd6bdf..b8e179c3b 100644
--- a/src/redist/redist.csproj
+++ b/src/redist/redist.csproj
@@ -101,7 +101,8 @@
+ $(PublishDir)/%(BundledToolProjects.Identity).dll;
+ $(PublishDir)/%(BundledToolProjects.Identity).pdb" />
+ AfterTargets="GenerateCliRuntimeConfigurationFiles">
@@ -208,6 +209,11 @@
+
+
+
+
+
@@ -227,11 +233,19 @@
Glob="$(CrossgenPath)"
Mode="u+x" />
+
+
+ true
+ false
+
+
@@ -248,23 +262,16 @@
-
+
- <_AllSdkFiles Include="$(PublishDir)/**/*" />
+
+
-
-
-
-
-
-
-
-
-
+
$(PublishDir)/vstest.console.runtimeconfig.json