Merge branch 'master' into templating_2.1.0-preview1_insertion_2017_11_09

This commit is contained in:
seancpeters 2017-11-14 14:04:55 -08:00 committed by GitHub
commit 29a3673535
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 83 additions and 33 deletions

View file

@ -22,14 +22,14 @@
<HostMonikerRid Condition=" '$(HostMonikerRid)' == '' ">$(HostOSName)-$(Architecture)</HostMonikerRid>
<ArtifactNameSdk>dotnet-sdk-internal</ArtifactNameSdk>
<ArtifactNameSdkDebug>dotnet-sdk-debug</ArtifactNameSdkDebug>
<ArtifactNameSdkSymbols>dotnet-sdk-symbols</ArtifactNameSdkSymbols>
<ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-sdk</ArtifactNameCombinedHostHostFxrFrameworkSdk>
<ArtifactNameSdkLanguagePack>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-langpack</ArtifactNameSdkLanguagePack>
<ArtifactNameWithVersionSdk>$(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdk>
<ArtifactNameWithVersionMSBuildExtensions>dotnet-standard-support-vs2015-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionMSBuildExtensions>
<ArtifactNameWithVersionSdkDebug>$(ArtifactNameSdkDebug)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdkDebug>
<ArtifactNameWithVersionSdkSymbols>$(ArtifactNameSdkSymbols)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdkSymbols>
<ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
<ArtifactNameWithVersionSdkLanguagePack>$(ArtifactNameSdkLanguagePack)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdkLanguagePack>
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CLI_SharedFrameworkVersion>2.1.0-preview1-25909-03</CLI_SharedFrameworkVersion>
<CLI_SharedFrameworkVersion>2.1.0-preview1-25912-02</CLI_SharedFrameworkVersion>
<CLI_MSBuild_Version>15.5.0-preview-000178-1116824</CLI_MSBuild_Version>
<CLI_Roslyn_Version>2.6.0-beta2-62210-01</CLI_Roslyn_Version>
<CLI_DiaSymNative_Version>1.6.0-beta2-25304</CLI_DiaSymNative_Version>
@ -13,13 +13,13 @@
<!-- We'll usually want to keep these versions in sync, but we may want to diverge in some
cases, so use separate properties but derive one from the other unless we want to
explicitly use different versions. -->
<CLI_NETSDK_Version>2.1.0-preview1-20171006-4</CLI_NETSDK_Version>
<CLI_NETSDK_Version>2.1.0-preview1-20171110-3</CLI_NETSDK_Version>
<CLI_MSBuildExtensions_Version>$(CLI_NETSDK_Version)</CLI_MSBuildExtensions_Version>
<CLI_NuGet_Version>4.5.0-preview2-4529</CLI_NuGet_Version>
<CLI_NETStandardLibraryNETFrameworkVersion>2.0.1-servicing-25908-02</CLI_NETStandardLibraryNETFrameworkVersion>
<CLI_WEBSDK_Version>2.0.0-rel-20171110-671</CLI_WEBSDK_Version>
<CLI_TestPlatform_Version>15.5.0-preview-20171031-01</CLI_TestPlatform_Version>
<CLI_TestPlatform_Version>15.5.0</CLI_TestPlatform_Version>
<SharedFrameworkVersion>$(CLI_SharedFrameworkVersion)</SharedFrameworkVersion>
<SharedHostVersion>$(CLI_SharedFrameworkVersion)</SharedHostVersion>
<HostFxrVersion>$(CLI_SharedFrameworkVersion)</HostFxrVersion>
@ -27,8 +27,8 @@
<TemplateEngineTemplateVersion>1.0.0-beta2-20171004-309</TemplateEngineTemplateVersion>
<TemplateEngineTemplate2_0Version>1.0.0-beta2-20171004-309</TemplateEngineTemplate2_0Version>
<AspnetTemplateVersion>1.0.0-beta2-20171004-309</AspnetTemplateVersion>
<PlatformAbstractionsVersion>2.1.0-preview1-25909-03</PlatformAbstractionsVersion>
<DependencyModelVersion>2.1.0-preview1-25909-03</DependencyModelVersion>
<PlatformAbstractionsVersion>2.1.0-preview1-25912-02</PlatformAbstractionsVersion>
<DependencyModelVersion>2.1.0-preview1-25912-02</DependencyModelVersion>
<CliCommandLineParserVersion>0.1.1-alpha-174</CliCommandLineParserVersion>
<CliMigrateVersion>1.2.1-alpha-002133</CliMigrateVersion>
<MicroBuildVersion>0.2.0</MicroBuildVersion>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SdkDebugLayoutOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkDebug)</SdkDebugLayoutOutputDirectory>
<SdkSymbolsLayoutOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkSymbols)</SdkSymbolsLayoutOutputDirectory>
<CombinedHostHostFxrFrameworkSdkOutputDirectory>$(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</CombinedHostHostFxrFrameworkSdkOutputDirectory>
<SdkLanguagePackOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkLanguagePack)</SdkLanguagePackOutputDirectory>
<SatelliteAssemblies>*.resources.dll</SatelliteAssemblies>
@ -12,7 +12,7 @@
<!-- Set up Items with Layout Input Files -->
<ItemGroup>
<SdkLayoutInput Include="$(OutputDirectory)/sdk/**/*" />
<SdkDebugLayoutInput Include="$(SymbolsDirectory)/sdk/**/*" />
<SdkSymbolsLayoutInput Include="$(SymbolsDirectory)/sdk/**/*" />
<CombinedHostHostFxrFrameworkSdkInput Include="$(OutputDirectory)/**/*" />
<SdkLanguagePackInput Include="$(OutputDirectory)/sdk/**/$(SatelliteAssemblies)" />
@ -30,9 +30,10 @@
<Output TaskParameter="RelativePath" ItemName="SdkRelativeOutputFiles" />
</MakeRelative>
<MakeRelative
Path1="$(SymbolsDirectory)"
Path2="%(SdkDebugLayoutInput.Identity)" >
<Output TaskParameter="RelativePath" ItemName="SdkDebugRelativeOutputFiles" />
Condition="'$(SeparateSymbolsArchive)' != 'false'"
Path1="$(SymbolsDirectory)/"
Path2="%(SdkSymbolsLayoutInput.Identity)" >
<Output TaskParameter="RelativePath" ItemName="SdkSymbolsRelativeOutputFiles" />
</MakeRelative>
<MakeRelative
Path1="$(OutputDirectory)/"
@ -70,11 +71,11 @@
<Name>$(ArtifactNameSdk)</Name>
</LayoutDefinition>
<LayoutDefinition Include="Debug">
<InputFiles>@(SdkDebugLayoutInput)</InputFiles>
<OutputFiles>@(SdkDebugRelativeOutputFiles -> '$(SdkDebugLayoutOutputDirectory)/%(Identity)')</OutputFiles>
<NameWithVersion>$(ArtifactNameWithVersionSdkDebug)</NameWithVersion>
<Name>$(ArtifactNameSdkDebug)</Name>
<LayoutDefinition Include="SdkSymbols" Condition="'$(SeparateSymbolsArchive)' != 'false'">
<InputFiles>@(SdkSymbolsLayoutInput)</InputFiles>
<OutputFiles>@(SdkSymbolsRelativeOutputFiles -> '$(SdkSymbolsLayoutOutputDirectory)/%(Identity)')</OutputFiles>
<NameWithVersion>$(ArtifactNameWithVersionSdkSymbols)</NameWithVersion>
<Name>$(ArtifactNameSdkSymbols)</Name>
</LayoutDefinition>
<LayoutDefinition Include="CombinedHostHostFxrFrameworkSdk">

View file

@ -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)

View file

@ -121,7 +121,8 @@
<Delete Files="$(PublishDir)/$(TargetName).deps.json;
$(PublishDir)/$(TargetName).runtimeconfig.json;
$(PublishDir)/%(BundledToolProjects.Identity).dll" />
$(PublishDir)/%(BundledToolProjects.Identity).dll;
$(PublishDir)/%(BundledToolProjects.Identity).pdb" />
<ChangeEntryPointLibraryName
DepsFile="$(PublishDir)/%(BundledTools.Identity).deps.json"
@ -218,7 +219,7 @@
<Target Name="CrossgenPublishDir"
Condition=" '$(DISABLE_CROSSGEN)' == '' "
AfterTargets="PublishMSBuildExtensions">
AfterTargets="GenerateCliRuntimeConfigurationFiles">
<ItemGroup>
<RoslynFiles Include="$(PublishDir)Roslyn\bincore\**\*" />
<FSharpFiles Include="$(PublishDir)FSharp\**\*" Exclude="$(PublishDir)FSharp\FSharp.Build.dll" />
@ -234,6 +235,13 @@
<!-- Don't try to CrossGen tasks and supporting DLLs compiled for .NET Framework -->
<RemainingFiles Remove="$(PublishDir)Microsoft\Microsoft.NET.Build.Extensions\tools\net*\**\*" />
<!-- Don't crossgen satellite assemblies -->
<RoslynFiles Remove="$(PublishDir)Roslyn\bincore\**\*.resources.dll" />
<FSharpFiles Remove="$(PublishDir)FSharp\**\*.resources.dll" />
<RemainingFiles Remove="$(PublishDir)**\*.resources.dll" />
<DiasymReaderPath Include="$(SharedFrameworkNameVersionPath)/Microsoft.DiaSymReader.Native.*.dll" />
</ItemGroup>
<AddMetadataIsPE Items="@(RoslynFiles)">
@ -264,12 +272,20 @@
Glob="$(CrossgenPath)"
Mode="u+x" />
<!-- Crossgen does not support generating symbols on Mac -->
<PropertyGroup Condition="'$(CreateCrossgenSymbols)' == ''">
<CreateCrossgenSymbols>true</CreateCrossgenSymbols>
<CreateCrossgenSymbols Condition="'$(OSName)' == 'osx'">false</CreateCrossgenSymbols>
</PropertyGroup>
<Crossgen
SourceAssembly="%(RoslynTargets.FullPath)"
DestinationPath="%(RoslynTargets.FullPath)"
JITPath="$(LibCLRJitPath)"
CrossgenPath="$(CrossgenPath)"
ReadyToRun="True"
CreateSymbols="$(CreateCrossgenSymbols)"
DiasymReaderPath="@(DiasymReaderPath)"
PlatformAssemblyPaths="@(PlatformAssemblies);@(RoslynFolders);$(SharedFrameworkNameVersionPath)" />
<Crossgen
@ -278,6 +294,8 @@
JITPath="$(LibCLRJitPath)"
CrossgenPath="$(CrossgenPath)"
ReadyToRun="True"
CreateSymbols="$(CreateCrossgenSymbols)"
DiasymReaderPath="@(DiasymReaderPath)"
PlatformAssemblyPaths="@(PlatformAssemblies);@(FSharpFolders);$(SharedFrameworkNameVersionPath)" />
<Crossgen
@ -286,6 +304,8 @@
JITPath="$(LibCLRJitPath)"
CrossgenPath="$(CrossgenPath)"
ReadyToRun="True"
CreateSymbols="$(CreateCrossgenSymbols)"
DiasymReaderPath="@(DiasymReaderPath)"
PlatformAssemblyPaths="@(PlatformAssemblies);@(RemainingFolders);$(SharedFrameworkNameVersionPath)" />
</Target>
@ -298,23 +318,16 @@
<Chmod Mode="755" Glob="$(SdkOutputDirectory)/FSharp/RunFsc.sh" />
</Target>
<Target Name="CreateSymbolsDirectory"
AfterTargets="CrossgenPublishDir">
<Target Name="SeparateSymbolsFromPublishDir"
AfterTargets="CrossgenPublishDir"
Condition="'$(SeparateSymbolsArchive)' != 'false'">
<ItemGroup>
<_AllSdkFiles Include="$(PublishDir)/**/*" />
<PdbsToMove Include="$(PublishDir)/**/*.pdb" />
<PdbsToMove Include="$(PublishDir)/**/*.ni.*.map" />
</ItemGroup>
<Copy SourceFiles="@(_AllSdkFiles)"
DestinationFiles="@(_AllSdkFiles->'$(SymbolsDirectory)/sdk/%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="RemovePdbsFromPublishDir"
AfterTargets="CreateSymbolsDirectory">
<ItemGroup>
<PdbsToClean Include="$(PublishDir)/**/*.pdb" />
</ItemGroup>
<Delete Files="@(PdbsToClean)" />
<Move SourceFiles="@(PdbsToMove)"
DestinationFiles="@(PdbsToMove->'$(SymbolsDirectory)/sdk/$(SdkVersion)/%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="PublishStage2WithBackwardsCompatibleRuntimes"
@ -335,6 +348,7 @@
</Target>
<Target Name="RetargetVSTestConsole"
BeforeTargets="PublishStage2WithBackwardsCompatibleRuntimes"
AfterTargets="Publish">
<PropertyGroup>
<VSTestRuntimeConfigPath>$(PublishDir)/vstest.console.runtimeconfig.json</VSTestRuntimeConfigPath>