Merge branch 'master' into dev/jgoshi/refactorPublishTarget
This commit is contained in:
commit
08ffc78be6
10 changed files with 65 additions and 69 deletions
|
@ -29,11 +29,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4
|
||||||
build\BranchInfo.props = build\BranchInfo.props
|
build\BranchInfo.props = build\BranchInfo.props
|
||||||
build\BuildDefaults.props = build\BuildDefaults.props
|
build\BuildDefaults.props = build\BuildDefaults.props
|
||||||
build\BuildOutputs.props = build\BuildOutputs.props
|
build\BuildOutputs.props = build\BuildOutputs.props
|
||||||
build\BundledSdks.proj = build\BundledSdks.proj
|
|
||||||
build\BundledRuntimes.props = build\BundledRuntimes.props
|
build\BundledRuntimes.props = build\BundledRuntimes.props
|
||||||
|
build\BundledSdks.proj = build\BundledSdks.proj
|
||||||
build\BundledSdks.props = build\BundledSdks.props
|
build\BundledSdks.props = build\BundledSdks.props
|
||||||
build\BundledTemplates.proj = build\BundledTemplates.proj
|
build\BundledTemplates.proj = build\BundledTemplates.proj
|
||||||
build\BundledTemplates.props = build\BundledTemplates.props
|
build\BundledTemplates.props = build\BundledTemplates.props
|
||||||
|
build\BundledTools.props = build\BundledTools.props
|
||||||
build\Compile.targets = build\Compile.targets
|
build\Compile.targets = build\Compile.targets
|
||||||
build\CoreSetupInfo.props = build\CoreSetupInfo.props
|
build\CoreSetupInfo.props = build\CoreSetupInfo.props
|
||||||
build\CrossgenInfo.props = build\CrossgenInfo.props
|
build\CrossgenInfo.props = build\CrossgenInfo.props
|
||||||
|
|
11
build/BundledTools.props
Normal file
11
build/BundledTools.props
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<Project>
|
||||||
|
<ItemGroup>
|
||||||
|
<BundledTools Include="MSBuild;
|
||||||
|
NuGet.CommandLine.XPlat;
|
||||||
|
dotnet" />
|
||||||
|
|
||||||
|
<BundledToolProjects Include="tool_msbuild;
|
||||||
|
tool_nuget;
|
||||||
|
redist;" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PublishOutputExtensions Include="$(ExeExtension);.dll;.pdb;.deps.json;.runtimeconfig.json" />
|
<PublishOutputExtensions Include="$(ExeExtension);.dll;.pdb;.deps.json;.runtimeconfig.json" />
|
||||||
<BundledTools Include="MSBuild;NuGet.CommandLine.XPlat;dotnet" />
|
|
||||||
<MSBuildImportsContent Include="$(MSBuildImportsDir)/**/*" />
|
<MSBuildImportsContent Include="$(MSBuildImportsDir)/**/*" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -16,35 +15,8 @@
|
||||||
GetNuGetPackagesArchive;" />
|
GetNuGetPackagesArchive;" />
|
||||||
|
|
||||||
<Target Name="CompileCLI">
|
<Target Name="CompileCLI">
|
||||||
<ItemGroup>
|
<RemoveDir Directories="$(StageDirectory)" />
|
||||||
<SharedFramework Remove="*" />
|
<MakeDir Directories="$(StageDirectory)"/>
|
||||||
<SharedFramework Include="$(SharedFrameworkPublishDirectory)/**/*" />
|
|
||||||
|
|
||||||
<RuntimeTargetsAssetsToRemoveFromDeps Remove="*" />
|
|
||||||
<RuntimeTargetsAssetsToRemoveFromDeps Include="MSBuild" />
|
|
||||||
|
|
||||||
<RuntimeAssetsToRemoveFromDeps Remove="*" />
|
|
||||||
<RuntimeAssetsToRemoveFromDeps Include="redist" />
|
|
||||||
<RuntimeAssetsToRemoveFromDeps Include="tool_msbuild" />
|
|
||||||
<RuntimeAssetsToRemoveFromDeps Include="tool_nuget" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<RemoveDir Directories="$(StageDirectory)" />
|
|
||||||
<MakeDir Directories="$(StageDirectory)"/>
|
|
||||||
|
|
||||||
<!-- CopySharedFramework -->
|
|
||||||
<Copy SourceFiles="@(SharedFramework)"
|
|
||||||
DestinationFiles="@(SharedFramework->'$(StageDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
|
||||||
|
|
||||||
<!-- Workaround for https://github.com/dotnet/sdk/issues/115 -->
|
|
||||||
<ItemGroup>
|
|
||||||
<HackFilesToCopy Include="$(NuGetPackagesDir)\microsoft.build.runtime\$(CLI_MSBuild_Version)\contentFiles\any\netcoreapp1.0\**;
|
|
||||||
$(NuGetPackagesDir)\microsoft.build.runtime\$(CLI_MSBuild_Version)\contentFiles\any\netcoreapp1.1\**;
|
|
||||||
$(NuGetPackagesDir)\microsoft.codeanalysis.build.tasks\$(CLI_Roslyn_Version)\contentFiles\any\any\**;
|
|
||||||
$(NuGetPackagesDir)\microsoft.testplatform.cli\$(CLI_TestPlatform_Version)\contentFiles\any\any\**" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Copy SourceFiles="@(HackFilesToCopy)"
|
|
||||||
DestinationFiles="@(HackFilesToCopy->'$(SdkOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
|
||||||
|
|
||||||
<!-- Publish DotNet -->
|
<!-- Publish DotNet -->
|
||||||
<DotNetPublish ToolPath="$(Stage0Directory)"
|
<DotNetPublish ToolPath="$(Stage0Directory)"
|
||||||
|
@ -53,30 +25,9 @@
|
||||||
|
|
||||||
<!-- Publish Roslyn -->
|
<!-- Publish Roslyn -->
|
||||||
<DotNetPublish ToolPath="$(Stage0Directory)"
|
<DotNetPublish ToolPath="$(Stage0Directory)"
|
||||||
Output="$(SdkOutputDirectory)/Roslyn"
|
|
||||||
Configuration="$(Configuration)"
|
Configuration="$(Configuration)"
|
||||||
VersionSuffix="$(CommitCount)"
|
|
||||||
ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
|
ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
|
||||||
|
|
||||||
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
|
|
||||||
SectionName="runtime"
|
|
||||||
AssetPath="%(RuntimeAssetsToRemoveFromDeps.Identity).dll" />
|
|
||||||
|
|
||||||
<Copy SourceFiles="$(SdkOutputDirectory)/redist.deps.json"
|
|
||||||
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json" />
|
|
||||||
|
|
||||||
<Copy SourceFiles="$(SdkOutputDirectory)/redist.runtimeconfig.json"
|
|
||||||
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).runtimeconfig.json" />
|
|
||||||
|
|
||||||
<ChangeEntryPointLibraryName
|
|
||||||
DepsFile="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json"
|
|
||||||
NewName="%(BundledTools.Identity).deps.json" />
|
|
||||||
|
|
||||||
<!-- cleanup project output we don't need -->
|
|
||||||
<Delete Files="$(SdkOutputDirectory)/redist%(PublishOutputExtensions.Identity)" />
|
|
||||||
<Delete Files="$(SdkOutputDirectory)/tool_msbuild%(PublishOutputExtensions.Identity)" />
|
|
||||||
<Delete Files="$(SdkOutputDirectory)/tool_nuget%(PublishOutputExtensions.Identity)" />
|
|
||||||
|
|
||||||
<!-- Copy Host to SDK Directory -->
|
<!-- Copy Host to SDK Directory -->
|
||||||
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostBaseName)"
|
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostBaseName)"
|
||||||
DestinationFiles="$(SdkOutputDirectory)/corehost$(ExeExtension)" />
|
DestinationFiles="$(SdkOutputDirectory)/corehost$(ExeExtension)" />
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
<Stage2Directory>$(BaseOutputDirectory)/stage2</Stage2Directory>
|
<Stage2Directory>$(BaseOutputDirectory)/stage2</Stage2Directory>
|
||||||
<Stage2SymbolsDirectory>$(BaseOutputDirectory)/stage2symbols</Stage2SymbolsDirectory>
|
<Stage2SymbolsDirectory>$(BaseOutputDirectory)/stage2symbols</Stage2SymbolsDirectory>
|
||||||
<Stage2SdkDirectory>$(Stage2Directory)/sdk/$(SdkVersion)</Stage2SdkDirectory>
|
<Stage2SdkDirectory>$(Stage2Directory)/sdk/$(SdkVersion)</Stage2SdkDirectory>
|
||||||
|
<Stage2RoslynDirectory>$(Stage2SdkDirectory)/Roslyn</Stage2RoslynDirectory>
|
||||||
<DotnetStage2>$(Stage2Directory)/dotnet$(ExeExtension)</DotnetStage2>
|
<DotnetStage2>$(Stage2Directory)/dotnet$(ExeExtension)</DotnetStage2>
|
||||||
<OutputDirectory>$(Stage2Directory)/</OutputDirectory>
|
<OutputDirectory>$(Stage2Directory)/</OutputDirectory>
|
||||||
<Stage2CompilationDirectory>$(BaseOutputDirectory)/stage2compilation</Stage2CompilationDirectory>
|
<Stage2CompilationDirectory>$(BaseOutputDirectory)/stage2compilation</Stage2CompilationDirectory>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<VersionSvgTemplate>$(RepoRoot)/resources/images/version_badge.svg</VersionSvgTemplate>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<Target Name="GenerateVersionBadge"
|
<Target Name="GenerateVersionBadge"
|
||||||
DependsOnTargets="Init">
|
DependsOnTargets="Init">
|
||||||
<PropertyGroup>
|
|
||||||
<VersionSvgTemplate>$(RepoRoot)/resources/images/version_badge.svg</VersionSvgTemplate>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Message Text="$(VersionBadge)" />
|
<Message Text="$(VersionBadge)" />
|
||||||
|
|
||||||
<ReplaceFileContents
|
<ReplaceFileContents
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
<Import Project="build/BranchInfo.props" />
|
<Import Project="build/BranchInfo.props" />
|
||||||
<Import Project="build/CoreSetupInfo.props" />
|
<Import Project="build/CoreSetupInfo.props" />
|
||||||
|
|
||||||
|
<Import Project="build/BundledTools.props" />
|
||||||
<Import Project="build/DependencyVersions.props" />
|
<Import Project="build/DependencyVersions.props" />
|
||||||
<Import Project="build/Version.props" />
|
<Import Project="build/Version.props" />
|
||||||
<Import Project="build/Branding.props" />
|
<Import Project="build/Branding.props" />
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.tasks" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
|
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
|
||||||
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.4</PackageTargetFallback>
|
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.4</PackageTargetFallback>
|
||||||
<PublishDir>$(Stage2SdkDirectory)</PublishDir>
|
<PublishDir>$(Stage2SdkDirectory)</PublishDir>
|
||||||
<VersionSuffix>$(CommitCount)</VersionSuffix>
|
<VersionSuffix>$(CommitCount)</VersionSuffix>
|
||||||
|
@ -18,6 +20,7 @@
|
||||||
<PackageReference Include="Microsoft.TestPlatform.CLI" Version="$(CLI_TestPlatform_Version)" />
|
<PackageReference Include="Microsoft.TestPlatform.CLI" Version="$(CLI_TestPlatform_Version)" />
|
||||||
<PackageReference Include="Microsoft.TestPlatform.Build" Version="$(CLI_TestPlatform_Version)" />
|
<PackageReference Include="Microsoft.TestPlatform.Build" Version="$(CLI_TestPlatform_Version)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\dotnet\dotnet.csproj" />
|
<ProjectReference Include="..\dotnet\dotnet.csproj" />
|
||||||
<ProjectReference Include="..\Microsoft.DotNet.Archive\Microsoft.DotNet.Archive.csproj" />
|
<ProjectReference Include="..\Microsoft.DotNet.Archive\Microsoft.DotNet.Archive.csproj" />
|
||||||
|
@ -30,4 +33,36 @@
|
||||||
<ProjectReference Include="..\tool_msbuild\tool_msbuild.csproj" />
|
<ProjectReference Include="..\tool_msbuild\tool_msbuild.csproj" />
|
||||||
<ProjectReference Include="..\tool_nuget\tool_nuget.csproj" />
|
<ProjectReference Include="..\tool_nuget\tool_nuget.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
|
||||||
|
<Target Name="PublishSharedFramework"
|
||||||
|
BeforeTargets="Publish">
|
||||||
|
<ItemGroup>
|
||||||
|
<SharedFramework Remove="*" />
|
||||||
|
<SharedFramework Include="$(SharedFrameworkPublishDirectory)/**/*" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Copy SourceFiles="@(SharedFramework)"
|
||||||
|
DestinationFiles="@(SharedFramework->'$(StageDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="GenerateCliRuntimeConfigurationFiles"
|
||||||
|
AfterTargets="Publish">
|
||||||
|
<RemoveAssetFromDepsPackages DepsFile="$(PublishDir)/$(TargetName).deps.json"
|
||||||
|
SectionName="runtime"
|
||||||
|
AssetPath="%(BundledToolProjects.Identity).dll" />
|
||||||
|
|
||||||
|
<Copy SourceFiles="$(PublishDir)/$(TargetName).deps.json"
|
||||||
|
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json" />
|
||||||
|
|
||||||
|
<Copy SourceFiles="$(PublishDir)/$(TargetName).runtimeconfig.json"
|
||||||
|
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).runtimeconfig.json" />
|
||||||
|
|
||||||
|
<Delete Files="$(PublishDir)/$(TargetName).deps.json;
|
||||||
|
$(PublishDir)/$(TargetName).runtimeconfig.json;
|
||||||
|
$(PublishDir)/%(BundledToolProjects.Identity).dll" />
|
||||||
|
|
||||||
|
<ChangeEntryPointLibraryName
|
||||||
|
DepsFile="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json"
|
||||||
|
NewName="%(BundledTools.Identity).deps.json" />
|
||||||
|
</Target>
|
||||||
|
</Project>
|
||||||
|
|
|
@ -4,9 +4,11 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||||
|
<GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
|
||||||
|
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NETCore.App" Version="$(CLI_SharedFrameworkVersion)" />
|
<PackageReference Include="Microsoft.NETCore.App" Version="$(CLI_SharedFrameworkVersion)" />
|
||||||
<PackageReference Include="Microsoft.Build.Runtime" Version="$(CLI_MSBuild_Version)" />
|
<PackageReference Include="Microsoft.Build.Runtime" Version="$(CLI_MSBuild_Version)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||||
|
<GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
|
||||||
|
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NETCore.App" Version="$(CLI_SharedFrameworkVersion)" />
|
<PackageReference Include="Microsoft.NETCore.App" Version="$(CLI_SharedFrameworkVersion)" />
|
||||||
|
|
|
@ -7,7 +7,10 @@
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
|
<PublishDir>$(Stage2RoslynDirectory)</PublishDir>
|
||||||
|
<VersionSuffix>$(CommitCount)</VersionSuffix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NetCore.App" Version="$(CLI_SharedFrameworkVersion)" />
|
<PackageReference Include="Microsoft.NetCore.App" Version="$(CLI_SharedFrameworkVersion)" />
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(CLI_Roslyn_Version)" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(CLI_Roslyn_Version)" />
|
||||||
|
@ -22,17 +25,6 @@
|
||||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="AddHackFilesToPublish"
|
|
||||||
AfterTargets="ComputeFilesToPublish">
|
|
||||||
<ItemGroup>
|
|
||||||
<!-- Workaround for https://github.com/dotnet/sdk/issues/115 -->
|
|
||||||
<HackFilesToCopy Include="$(NuGetPackagesDir)\microsoft.codeanalysis.build.tasks\$(CLI_Roslyn_Version)\contentFiles\any\any\**;" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<Copy SourceFiles="@(HackFilesToCopy)"
|
|
||||||
DestinationFiles="@(HackFilesToCopy->'$(PublishDir)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="MakeCscRunnableAndMoveToPublishDir"
|
<Target Name="MakeCscRunnableAndMoveToPublishDir"
|
||||||
AfterTargets="Publish"
|
AfterTargets="Publish"
|
||||||
|
|
Loading…
Add table
Reference in a new issue