2017-02-16 22:15:05 +00:00
|
|
|
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
2016-12-02 04:10:42 +00:00
|
|
|
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
2017-02-23 06:44:52 +00:00
|
|
|
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.tasks" />
|
2017-03-01 08:30:02 +00:00
|
|
|
|
<Import Project="$(RepoRoot)/build/compile/LzmaArchive.targets" />
|
2017-03-24 00:25:40 +00:00
|
|
|
|
<Import Project="$(RepoRoot)/build/MSBuildExtensions.targets" />
|
2017-03-01 08:30:02 +00:00
|
|
|
|
|
2016-10-29 08:04:20 +00:00
|
|
|
|
<PropertyGroup>
|
2017-01-10 23:31:43 +00:00
|
|
|
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
2017-01-26 03:19:44 +00:00
|
|
|
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
|
|
|
|
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
2016-10-29 08:04:20 +00:00
|
|
|
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
2017-02-23 06:44:52 +00:00
|
|
|
|
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
|
2017-01-26 03:19:44 +00:00
|
|
|
|
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.4</PackageTargetFallback>
|
2017-02-27 19:06:44 +00:00
|
|
|
|
<PublishDir>$(SdkOutputDirectory)</PublishDir>
|
2017-02-16 22:15:05 +00:00
|
|
|
|
<VersionSuffix>$(CommitCount)</VersionSuffix>
|
2016-10-29 08:04:20 +00:00
|
|
|
|
</PropertyGroup>
|
2017-02-16 22:15:05 +00:00
|
|
|
|
|
2016-10-29 08:04:20 +00:00
|
|
|
|
<ItemGroup>
|
2017-02-16 22:15:05 +00:00
|
|
|
|
<PackageReference Include="Microsoft.NETCore.App" Version="$(CLI_SharedFrameworkVersion)" />
|
|
|
|
|
<PackageReference Include="Microsoft.Build.Runtime" Version="$(CLI_MSBuild_Version)" />
|
|
|
|
|
<PackageReference Include="NuGet.Build.Tasks" Version="$(CLI_NuGet_Version)" />
|
|
|
|
|
<PackageReference Include="Microsoft.TestPlatform.CLI" Version="$(CLI_TestPlatform_Version)" />
|
|
|
|
|
<PackageReference Include="Microsoft.TestPlatform.Build" Version="$(CLI_TestPlatform_Version)" />
|
2017-05-01 22:54:04 +00:00
|
|
|
|
<PackageReference Include="NuGet.ProjectModel" Version="$(CLI_NuGet_Version)" />
|
2017-05-19 22:59:44 +00:00
|
|
|
|
<!-- The project json migration commands depend on an older version of Roslyn.
|
|
|
|
|
Lift the version here to match what tool_roslyn depends on (otherwise an older version will
|
|
|
|
|
be added to the TPA when we crossgen and we won't be able to crossgen tool_roslyn -->
|
|
|
|
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(CLI_Roslyn_Version)" />
|
2016-10-29 08:04:20 +00:00
|
|
|
|
</ItemGroup>
|
2017-02-23 06:44:52 +00:00
|
|
|
|
|
2017-01-26 03:19:44 +00:00
|
|
|
|
<ItemGroup>
|
2016-10-29 08:04:20 +00:00
|
|
|
|
<ProjectReference Include="..\dotnet\dotnet.csproj" />
|
|
|
|
|
<ProjectReference Include="..\Microsoft.DotNet.TestFramework\Microsoft.DotNet.TestFramework.csproj" />
|
|
|
|
|
<ProjectReference Include="..\tool_msbuild\tool_msbuild.csproj" />
|
|
|
|
|
<ProjectReference Include="..\tool_nuget\tool_nuget.csproj" />
|
|
|
|
|
</ItemGroup>
|
2017-02-23 06:44:52 +00:00
|
|
|
|
|
2017-05-24 23:12:11 +00:00
|
|
|
|
<ItemGroup>
|
|
|
|
|
<Content Include="minimumMSBuildVersion">
|
|
|
|
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
|
|
|
|
</Content>
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
2017-04-28 05:20:43 +00:00
|
|
|
|
<Target Name="PublishAspNetRuntimePackageStore"
|
|
|
|
|
AfterTargets="CrossgenPublishDir">
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<AspNetRuntimePackageStore Remove="*" />
|
|
|
|
|
<AspNetRuntimePackageStore Include="$(AspNetRuntimePackageStorePublishDirectory)/**/*" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<Copy SourceFiles="@(AspNetRuntimePackageStore)"
|
|
|
|
|
DestinationFiles="@(AspNetRuntimePackageStore->'$(OutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
|
|
|
|
</Target>
|
|
|
|
|
|
2017-02-23 09:12:32 +00:00
|
|
|
|
<Target Name="PublishSharedFramework"
|
|
|
|
|
BeforeTargets="Publish">
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<SharedFramework Remove="*" />
|
|
|
|
|
<SharedFramework Include="$(SharedFrameworkPublishDirectory)/**/*" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<Copy SourceFiles="@(SharedFramework)"
|
2017-02-27 19:06:44 +00:00
|
|
|
|
DestinationFiles="@(SharedFramework->'$(OutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
2017-02-23 09:12:32 +00:00
|
|
|
|
</Target>
|
|
|
|
|
|
2017-02-23 10:33:00 +00:00
|
|
|
|
<Target Name="PublishVersionFile"
|
|
|
|
|
BeforeTargets="Publish">
|
|
|
|
|
|
2017-02-28 08:38:27 +00:00
|
|
|
|
<WriteLinesToFile File="$(PublishDir)/.version"
|
2017-02-23 10:33:00 +00:00
|
|
|
|
Lines="$(CommitHash);$(SdkVersion);$(Rid)"
|
|
|
|
|
Overwrite="true" />
|
|
|
|
|
</Target>
|
|
|
|
|
|
2017-02-28 09:39:45 +00:00
|
|
|
|
<Target Name="PublishRoslyn"
|
|
|
|
|
BeforeTargets="Publish">
|
|
|
|
|
|
|
|
|
|
<DotNetPublish ToolPath="$(Stage0Directory)"
|
|
|
|
|
Configuration="$(Configuration)"
|
|
|
|
|
ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
|
|
|
|
|
</Target>
|
|
|
|
|
|
2017-05-20 06:20:19 +00:00
|
|
|
|
<Target Name="PublishFSharp"
|
|
|
|
|
BeforeTargets="Publish">
|
|
|
|
|
|
|
|
|
|
<DotNetPublish ToolPath="$(Stage0Directory)"
|
|
|
|
|
Configuration="$(Configuration)"
|
|
|
|
|
ProjectPath="$(SrcDirectory)/tool_fsharp/tool_fsc.csproj" />
|
|
|
|
|
</Target>
|
|
|
|
|
|
2017-02-23 06:44:52 +00:00
|
|
|
|
<Target Name="GenerateCliRuntimeConfigurationFiles"
|
|
|
|
|
AfterTargets="Publish">
|
|
|
|
|
<RemoveAssetFromDepsPackages DepsFile="$(PublishDir)/$(TargetName).deps.json"
|
|
|
|
|
SectionName="runtime"
|
|
|
|
|
AssetPath="%(BundledToolProjects.Identity).dll" />
|
|
|
|
|
|
|
|
|
|
<Copy SourceFiles="$(PublishDir)/$(TargetName).deps.json"
|
2017-02-28 08:38:27 +00:00
|
|
|
|
DestinationFiles="$(PublishDir)/%(BundledTools.Identity).deps.json" />
|
2017-02-23 06:44:52 +00:00
|
|
|
|
|
|
|
|
|
<Copy SourceFiles="$(PublishDir)/$(TargetName).runtimeconfig.json"
|
2017-02-28 08:38:27 +00:00
|
|
|
|
DestinationFiles="$(PublishDir)/%(BundledTools.Identity).runtimeconfig.json" />
|
2017-02-23 06:44:52 +00:00
|
|
|
|
|
|
|
|
|
<Delete Files="$(PublishDir)/$(TargetName).deps.json;
|
|
|
|
|
$(PublishDir)/$(TargetName).runtimeconfig.json;
|
|
|
|
|
$(PublishDir)/%(BundledToolProjects.Identity).dll" />
|
|
|
|
|
|
|
|
|
|
<ChangeEntryPointLibraryName
|
2017-02-28 08:38:27 +00:00
|
|
|
|
DepsFile="$(PublishDir)/%(BundledTools.Identity).deps.json"
|
2017-02-23 06:44:52 +00:00
|
|
|
|
NewName="%(BundledTools.Identity).deps.json" />
|
|
|
|
|
</Target>
|
2017-02-23 10:13:04 +00:00
|
|
|
|
|
|
|
|
|
<Target Name="PublishMSBuildExtensions"
|
2017-03-24 00:25:40 +00:00
|
|
|
|
DependsOnTargets="GenerateMSBuildExtensions"
|
2017-02-23 18:25:28 +00:00
|
|
|
|
AfterTargets="Publish"
|
|
|
|
|
BeforeTargets="GenerateCliRuntimeConfigurationFiles">
|
2017-02-23 10:13:04 +00:00
|
|
|
|
|
|
|
|
|
<Copy SourceFiles="@(MSBuildExtensionsContent)"
|
2017-02-28 02:48:05 +00:00
|
|
|
|
DestinationFolder="$(PublishDir)/%(RecursiveDir)" />
|
2017-02-23 10:46:05 +00:00
|
|
|
|
|
2017-02-27 23:40:11 +00:00
|
|
|
|
<PropertyGroup>
|
2017-02-28 02:48:05 +00:00
|
|
|
|
<MSBuildTargetsDirectory>$(PublishDir)/runtimes/any/native</MSBuildTargetsDirectory>
|
2017-02-27 23:40:11 +00:00
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
2017-02-23 10:46:05 +00:00
|
|
|
|
<ItemGroup>
|
|
|
|
|
<NuPkgContentForMSBuildExtensions Include="$(MSBuildTargetsDirectory)/**/*.targets;
|
|
|
|
|
$(MSBuildTargetsDirectory)/**/*.props;
|
|
|
|
|
$(MSBuildTargetsDirectory)/**/*.overridetasks;
|
|
|
|
|
$(MSBuildTargetsDirectory)/**/*.tasks" />
|
2017-02-28 01:10:33 +00:00
|
|
|
|
|
|
|
|
|
<NuPkgContentForMSBuildExtensionsRelativePaths Include="@(NuPkgContentForMSBuildExtensions->'runtimes/any/native/%(RecursiveDir)%(Filename)%(Extension)')" />
|
2017-02-23 10:46:05 +00:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
2017-02-28 02:19:06 +00:00
|
|
|
|
<Move SourceFiles="@(NuPkgContentForMSBuildExtensions)"
|
2017-02-28 02:48:05 +00:00
|
|
|
|
DestinationFiles="@(NuPkgContentForMSBuildExtensions->'$(PublishDir)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
2017-02-28 02:19:06 +00:00
|
|
|
|
|
2017-02-23 18:25:28 +00:00
|
|
|
|
<RemoveAssetFromDepsPackages DepsFile="$(PublishDir)/$(TargetName).deps.json"
|
2017-02-27 18:20:01 +00:00
|
|
|
|
SectionName="runtimeTargets"
|
2017-02-28 01:10:33 +00:00
|
|
|
|
AssetPath="%(NuPkgContentForMSBuildExtensionsRelativePaths.Identity)" />
|
2017-02-23 10:13:04 +00:00
|
|
|
|
</Target>
|
2017-02-28 08:38:27 +00:00
|
|
|
|
|
2017-03-01 08:30:02 +00:00
|
|
|
|
<Target Name="PublishSdks"
|
|
|
|
|
AfterTargets="Publish">
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<SdksToBundle Include="$(RepoRoot)/build/BundledSdks.proj">
|
|
|
|
|
<Properties>
|
|
|
|
|
CLIBuildDll=$(CLIBuildDll);
|
|
|
|
|
NuGetPackagesDir=$(NuGetPackagesDir);
|
|
|
|
|
SdkLayoutDirectory=$(SdkOutputDirectory)/Sdks/%(BundledSdk.Identity);
|
|
|
|
|
SdkPackageName=%(BundledSdk.Identity);
|
|
|
|
|
SdkPackageVersion=%(BundledSdk.Version);
|
2017-03-01 08:46:13 +00:00
|
|
|
|
Stage0Directory=$(Stage0Directory)
|
2017-03-01 08:30:02 +00:00
|
|
|
|
</Properties>
|
|
|
|
|
</SdksToBundle>
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<MSBuild
|
|
|
|
|
BuildInParallel="False"
|
|
|
|
|
Projects="@(SdksToBundle)">
|
|
|
|
|
</MSBuild>
|
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
<Target Name="PublishTemplates"
|
|
|
|
|
AfterTargets="Publish">
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<TemplatesToBundle Include="$(RepoRoot)/build/BundledTemplates.proj">
|
|
|
|
|
<Properties>
|
|
|
|
|
TemplateLayoutDirectory=$(SdkOutputDirectory)/Templates;
|
|
|
|
|
TemplatePackageName=%(BundledTemplate.Identity);
|
|
|
|
|
TemplatePackageVersion=%(BundledTemplate.Version);
|
2017-03-01 08:46:13 +00:00
|
|
|
|
Stage0Directory=$(Stage0Directory)
|
2017-03-01 08:30:02 +00:00
|
|
|
|
</Properties>
|
|
|
|
|
</TemplatesToBundle>
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<MSBuild
|
|
|
|
|
BuildInParallel="False"
|
|
|
|
|
Projects="@(TemplatesToBundle)">
|
|
|
|
|
</MSBuild>
|
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
<Target Name="PublishLzmaArchive"
|
2017-04-28 05:28:32 +00:00
|
|
|
|
Condition="'$(CLIBUILD_SKIP_LZMA)' != 'true'"
|
2017-03-01 08:30:02 +00:00
|
|
|
|
DependsOnTargets="GetNuGetPackagesArchive"
|
|
|
|
|
AfterTargets="Publish">
|
|
|
|
|
</Target>
|
|
|
|
|
|
2017-02-28 08:38:27 +00:00
|
|
|
|
<Target Name="CrossgenPublishDir"
|
|
|
|
|
Condition=" '$(DISABLE_CROSSGEN)' == '' "
|
|
|
|
|
AfterTargets="PublishMSBuildExtensions">
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<!-- Removing Full CLR built TestHost assemblies from getting Crossgen as it is throwing error -->
|
|
|
|
|
<SdkFiles Include="$(PublishDir)/**/*" Exclude="$(PublishDir)/TestHost*/**/*;$(PublishDir)/Sdks/**/*" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<AddMetadataIsPE Items="@(SdkFiles)">
|
|
|
|
|
<Output TaskParameter="ResultItems" ItemName="SdkFilesWithPEMarker" />
|
|
|
|
|
</AddMetadataIsPE>
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<CrossgenTargets Include="%(SdkFilesWithPEMarker.FullPath)" Condition=" '%(SdkFilesWithPEMarker.IsPE)' == 'True' " />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<RemoveDuplicates Inputs="@(SdkFiles->'%(RootDir)%(Directory)')">
|
|
|
|
|
<Output TaskParameter="Filtered" ItemName="PublishDirSubDirectories" />
|
|
|
|
|
</RemoveDuplicates>
|
|
|
|
|
|
|
|
|
|
<!-- Ensure crossgen tool is executable. See https://github.com/NuGet/Home/issues/4424 -->
|
|
|
|
|
<Chmod Condition=" '$(OSName)' != 'win' "
|
2017-03-01 02:16:51 +00:00
|
|
|
|
Glob="$(CrossgenPath)"
|
|
|
|
|
Mode="u+x" />
|
2017-02-28 08:38:27 +00:00
|
|
|
|
|
|
|
|
|
<Crossgen SourceAssembly="%(CrossgenTargets.FullPath)"
|
|
|
|
|
DestinationPath="%(CrossgenTargets.FullPath)"
|
|
|
|
|
JITPath="$(LibCLRJitPath)"
|
|
|
|
|
CrossgenPath="$(CrossgenPath)"
|
|
|
|
|
ReadyToRun="True"
|
|
|
|
|
PlatformAssemblyPaths="@(PlatformAssemblies);
|
|
|
|
|
@(PublishDirSubDirectories);
|
|
|
|
|
$(SharedFrameworkNameVersionPath)" />
|
|
|
|
|
</Target>
|
2017-03-01 02:16:51 +00:00
|
|
|
|
|
2017-03-01 06:52:08 +00:00
|
|
|
|
<Target Name="ChmodPublishDir"
|
2017-05-17 23:05:22 +00:00
|
|
|
|
AfterTargets="CrossgenPublishDir"
|
2017-03-01 06:52:08 +00:00
|
|
|
|
Condition=" '$(OSName)' != 'win' ">
|
|
|
|
|
|
|
|
|
|
<Exec Command="find $(SdkOutputDirectory) -type d -exec chmod 755 {} \;" />
|
|
|
|
|
<Exec Command="find $(SdkOutputDirectory) -type f -exec chmod 644 {} \;" />
|
|
|
|
|
<Chmod Mode="755" Glob="$(SdkOutputDirectory)/Roslyn/RunCsc.sh" />
|
2017-05-17 23:05:22 +00:00
|
|
|
|
<Chmod Mode="755" Glob="$(SdkOutputDirectory)/Roslyn/RunVbc.sh" />
|
2017-06-02 03:14:09 +00:00
|
|
|
|
<Chmod Mode="755" Glob="$(SdkOutputDirectory)/FSharp/RunFsc.sh" />
|
2017-03-01 06:52:08 +00:00
|
|
|
|
</Target>
|
|
|
|
|
|
2017-03-01 03:10:49 +00:00
|
|
|
|
<Target Name="CreateSymbolsDirectory"
|
2017-05-17 23:05:22 +00:00
|
|
|
|
AfterTargets="CrossgenPublishDir">
|
2017-03-01 03:10:49 +00:00
|
|
|
|
<ItemGroup>
|
2017-03-01 03:16:55 +00:00
|
|
|
|
<_AllSdkFiles Include="$(PublishDir)/**/*" />
|
2017-03-01 03:10:49 +00:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<Copy SourceFiles="@(_AllSdkFiles)"
|
2017-03-01 09:24:07 +00:00
|
|
|
|
DestinationFiles="@(_AllSdkFiles->'$(SymbolsDirectory)/sdk/%(RecursiveDir)%(Filename)%(Extension)')" />
|
2017-03-01 03:10:49 +00:00
|
|
|
|
</Target>
|
2017-03-01 03:16:55 +00:00
|
|
|
|
|
|
|
|
|
<Target Name="RemovePdbsFromPublishDir"
|
|
|
|
|
AfterTargets="CreateSymbolsDirectory">
|
|
|
|
|
<ItemGroup>
|
2017-03-01 06:52:08 +00:00
|
|
|
|
<PdbsToClean Include="$(PublishDir)/**/*.pdb" />
|
2017-03-01 03:16:55 +00:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<Delete Files="@(PdbsToClean)" />
|
|
|
|
|
</Target>
|
2017-04-06 20:43:26 +00:00
|
|
|
|
|
2017-04-08 07:29:20 +00:00
|
|
|
|
<Target Name="PublishStage2WithBackwardsCompatibleRuntimes"
|
2017-04-07 03:17:52 +00:00
|
|
|
|
AfterTargets="PublishLzmaArchive;">
|
2017-04-06 20:43:26 +00:00
|
|
|
|
<ItemGroup>
|
2017-04-08 07:29:20 +00:00
|
|
|
|
<BackwardsCompatibleSharedFrameworks Remove="*" />
|
|
|
|
|
<BackwardsCompatibleSharedFrameworks Include="$(BackwardsCompatibleSharedFrameworksPublishDirectory)/**/*" />
|
2017-04-06 20:43:26 +00:00
|
|
|
|
|
|
|
|
|
<Stage2Cli Remove="*" />
|
|
|
|
|
<Stage2Cli Include="$(OutputDirectory)/**/*" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
2017-04-08 07:29:20 +00:00
|
|
|
|
<Copy SourceFiles="@(BackwardsCompatibleSharedFrameworks)"
|
|
|
|
|
DestinationFiles="@(BackwardsCompatibleSharedFrameworks->'$(Stage2WithBackwardsCompatibleRuntimesOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
2017-04-06 20:43:26 +00:00
|
|
|
|
|
|
|
|
|
<Copy SourceFiles="@(Stage2Cli)"
|
2017-04-08 07:29:20 +00:00
|
|
|
|
DestinationFiles="@(Stage2Cli->'$(Stage2WithBackwardsCompatibleRuntimesOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
2017-04-06 20:43:26 +00:00
|
|
|
|
</Target>
|
2017-02-23 06:44:52 +00:00
|
|
|
|
</Project>
|