Merge pull request #5809 from piotrpMSFT/piotrp/Infra/DepsCreation
Move tool deps file creation into redist.csproj
This commit is contained in:
commit
27f89d6b7b
7 changed files with 43 additions and 30 deletions
|
@ -28,11 +28,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>
|
||||||
|
|
||||||
|
@ -19,14 +18,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<SharedFramework Remove="*" />
|
<SharedFramework Remove="*" />
|
||||||
<SharedFramework Include="$(SharedFrameworkPublishDirectory)/**/*" />
|
<SharedFramework Include="$(SharedFrameworkPublishDirectory)/**/*" />
|
||||||
|
|
||||||
<RuntimeTargetsAssetsToRemoveFromDeps Remove="*" />
|
|
||||||
<RuntimeTargetsAssetsToRemoveFromDeps Include="MSBuild" />
|
|
||||||
|
|
||||||
<RuntimeAssetsToRemoveFromDeps Remove="*" />
|
|
||||||
<RuntimeAssetsToRemoveFromDeps Include="redist" />
|
|
||||||
<RuntimeAssetsToRemoveFromDeps Include="tool_msbuild" />
|
|
||||||
<RuntimeAssetsToRemoveFromDeps Include="tool_nuget" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<RemoveDir Directories="$(StageDirectory)" />
|
<RemoveDir Directories="$(StageDirectory)" />
|
||||||
|
@ -46,25 +37,6 @@
|
||||||
Configuration="$(Configuration)"
|
Configuration="$(Configuration)"
|
||||||
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)" />
|
||||||
|
|
|
@ -11,6 +11,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,25 @@
|
||||||
<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="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,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)" />
|
||||||
|
|
|
@ -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)" />
|
||||||
|
|
Loading…
Reference in a new issue