2017-03-22 02:02:20 +00:00
|
|
|
<Project>
|
2018-03-19 19:31:16 +00:00
|
|
|
|
2017-03-24 00:25:40 +00:00
|
|
|
<Target Name="GenerateMSBuildExtensions"
|
2018-03-19 19:31:16 +00:00
|
|
|
DependsOnTargets="GenerateBundledVersionsProps;GenerateBundledCliToolsProps;RestoreMSBuildExtensionsPackages">
|
2017-03-22 02:02:20 +00:00
|
|
|
|
2017-03-24 00:25:40 +00:00
|
|
|
<ItemGroup>
|
2018-03-19 19:31:16 +00:00
|
|
|
|
2017-06-09 18:18:46 +00:00
|
|
|
<!-- The MSBuildExtensionsContent item is for the files that will be laid out in the CLI install -->
|
2017-03-24 00:25:40 +00:00
|
|
|
<MSBuildExtensionsContent Include="$(GeneratedMSBuildExtensionsDirectory)/**/*" />
|
2017-06-08 00:27:34 +00:00
|
|
|
|
2017-06-08 20:33:17 +00:00
|
|
|
<!-- We want to include the tasks and targets from the Microsoft.NET.Build.Extensions package, but we don't want to include the DLLs
|
|
|
|
from that package under the net461, net462, etc folders. That is because they come from the NETStandard.Library.NETFramework
|
|
|
|
package, and we want to insert them directly into the CLI from CoreFx instead of having to do a two-hop insertion (CoreFX -> SDK -> CLI)
|
|
|
|
if we need to update them.
|
2018-03-19 19:31:16 +00:00
|
|
|
|
2017-06-08 20:33:17 +00:00
|
|
|
https://github.com/dotnet/sdk/issues/1324 has been filed to exclude these from the Microsoft.NET.Build.Extensions package when
|
|
|
|
we generate it.
|
|
|
|
-->
|
2017-06-08 00:27:34 +00:00
|
|
|
<MSBuildExtensionsContent Include="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions\**\*.*"
|
2017-06-10 01:18:55 +00:00
|
|
|
Exclude="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions\Microsoft\Microsoft.NET.Build.Extensions\net*\**" />
|
2018-03-19 19:31:16 +00:00
|
|
|
|
2017-06-10 01:58:53 +00:00
|
|
|
<!-- Don't include .NET Framework MS.NET.Build.Extensions tasks in CLI layout -->
|
|
|
|
<MSBuildExtensionsContent Remove="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions\Microsoft\Microsoft.NET.Build.Extensions\tools\net46\**" />
|
2017-06-08 20:33:17 +00:00
|
|
|
|
2017-06-08 00:27:34 +00:00
|
|
|
<MSBuildExtensionsContent Include="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions-ver\**\*.*"
|
|
|
|
DeploymentSubpath="$(MSBuildExtensionsVersionSubfolder)/" />
|
2018-03-19 19:31:16 +00:00
|
|
|
|
2017-06-08 00:27:34 +00:00
|
|
|
<MSBuildExtensionsContent Include="$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.*"
|
|
|
|
Exclude="$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.props;$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.targets"
|
2017-06-10 01:18:55 +00:00
|
|
|
DeploymentSubpath="Microsoft/Microsoft.NET.Build.Extensions/" />
|
2017-06-09 18:18:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- The VSMSBuildExtensionsContent item is for the files that will be included in the VS.Redist.Common.Net.Core.SDK.MSBuildExtensions
|
|
|
|
package and inserted into Visual Studio -->
|
|
|
|
<VSMSBuildExtensionsContent Include="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions\**\*.*"
|
2017-06-10 01:18:55 +00:00
|
|
|
Exclude="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions\Microsoft\Microsoft.NET.Build.Extensions\net*\**"
|
2017-06-09 18:18:46 +00:00
|
|
|
DeploymentSubpath="msbuildExtensions/"/>
|
2017-06-10 01:58:53 +00:00
|
|
|
|
|
|
|
<!-- Don't include .NET Core MS.NET.Build.Extensions tasks in Full Framework MSBuild layout -->
|
|
|
|
<VSMSBuildExtensionsContent Remove="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions\Microsoft\Microsoft.NET.Build.Extensions\tools\netcoreapp*\**" />
|
|
|
|
|
2017-06-09 18:18:46 +00:00
|
|
|
<VSMSBuildExtensionsContent Include="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions-ver\**\*.*"
|
|
|
|
DeploymentSubpath="msbuildExtensions-ver/"/>
|
|
|
|
<VSMSBuildExtensionsContent Include="$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.*"
|
|
|
|
Exclude="$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.props;$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.targets"
|
2017-06-10 01:18:55 +00:00
|
|
|
DeploymentSubpath="msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/" />
|
2017-06-09 18:18:46 +00:00
|
|
|
|
|
|
|
<VSMSBuildExtensionsContent Update="@(VSMSBuildExtensionsContent)">
|
|
|
|
<DestinationPath >$(MSBuildExtensionsLayoutDirectory)/%(VSMSBuildExtensionsContent.DeploymentSubpath)%(RecursiveDir)%(Filename)%(Extension)</DestinationPath>
|
|
|
|
</VSMSBuildExtensionsContent>
|
2017-03-24 00:25:40 +00:00
|
|
|
</ItemGroup>
|
2017-06-09 18:18:46 +00:00
|
|
|
|
|
|
|
<Copy SourceFiles="@(VSMSBuildExtensionsContent)" DestinationFiles="%(VSMSBuildExtensionsContent.DestinationPath)" />
|
2017-03-24 00:25:40 +00:00
|
|
|
</Target>
|
|
|
|
|
2017-06-08 00:27:34 +00:00
|
|
|
<Target Name="PrepareMSBuildExtensionsProps">
|
|
|
|
<PropertyGroup>
|
|
|
|
<MSBuildExtensionsPackageName>Microsoft.NET.Build.Extensions</MSBuildExtensionsPackageName>
|
|
|
|
<MSBuildExtensionsVersionSubfolder>15.0</MSBuildExtensionsVersionSubfolder>
|
2017-12-02 04:07:48 +00:00
|
|
|
<MSBuildExtensionsNuPkgPath>$(NuGetPackagesDir)/$(MSBuildExtensionsPackageName.ToLower())/$(MicrosoftNETBuildExtensionsPackageVersion.ToLower())</MSBuildExtensionsNuPkgPath>
|
2017-06-08 00:27:34 +00:00
|
|
|
|
|
|
|
<NETStandardLibraryNETFrameworkPackageName>NETStandard.Library.NETFramework</NETStandardLibraryNETFrameworkPackageName>
|
|
|
|
<NETStandardLibraryNETFrameworkNuPkgPath>$(NuGetPackagesDir)/$(NETStandardLibraryNETFrameworkPackageName.ToLower())/$(CLI_NETStandardLibraryNETFrameworkVersion.ToLower())</NETStandardLibraryNETFrameworkNuPkgPath>
|
|
|
|
</PropertyGroup>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="RestoreMSBuildExtensionsPackages"
|
|
|
|
DependsOnTargets="PrepareMSBuildExtensionsProps">
|
|
|
|
<ItemGroup>
|
2017-12-02 04:07:48 +00:00
|
|
|
<ExtensionPackageToRestore Include="$(MSBuildExtensionsPackageName)" Version="$(MicrosoftNETBuildExtensionsPackageVersion)"/>
|
2017-06-08 00:27:34 +00:00
|
|
|
<ExtensionPackageToRestore Include="$(NETStandardLibraryNETFrameworkPackageName)" Version="$(CLI_NETStandardLibraryNETFrameworkVersion)"/>
|
2018-03-19 19:31:16 +00:00
|
|
|
|
2017-06-08 00:27:34 +00:00
|
|
|
<ExtensionRestore Include="$(RepoRoot)/build/RestoreDependency.proj">
|
|
|
|
<Properties>
|
|
|
|
CLIBuildDll=$(CLIBuildDll);
|
|
|
|
NuGetPackagesDir=$(NuGetPackagesDir);
|
|
|
|
DependencyPackageName=%(ExtensionPackageToRestore.Identity);
|
|
|
|
DependencyPackageVersion=%(ExtensionPackageToRestore.Version);
|
2017-08-11 23:13:43 +00:00
|
|
|
PreviousStageDirectory=$(PreviousStageDirectory)
|
2017-06-08 00:27:34 +00:00
|
|
|
</Properties>
|
|
|
|
</ExtensionRestore>
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<MSBuild
|
|
|
|
BuildInParallel="False"
|
|
|
|
Projects="@(ExtensionRestore)">
|
|
|
|
</MSBuild>
|
|
|
|
</Target>
|
|
|
|
|
2018-01-17 18:13:41 +00:00
|
|
|
<Target Name="GenerateBundledVersionsProps" DependsOnTargets="RunResolvePackageDependencies">
|
2017-03-24 00:25:40 +00:00
|
|
|
<PropertyGroup>
|
|
|
|
<BundledVersionsPropsFileName>Microsoft.NETCoreSdk.BundledVersions.props</BundledVersionsPropsFileName>
|
|
|
|
</PropertyGroup>
|
2017-03-22 02:02:20 +00:00
|
|
|
|
2018-03-19 19:31:16 +00:00
|
|
|
<!--
|
2017-03-22 02:02:20 +00:00
|
|
|
The bundled version of Microsoft.NETCore.App is determined statically from DependencyVersions.props whereas the bundled version
|
|
|
|
of NETStandard.Library is defined by what Microsoft.NETCore.App pulls in. This digs in to the package resolution items of
|
|
|
|
of our build against Microsoft.NETCore.App to find the correct NETStandard.Library version
|
|
|
|
-->
|
|
|
|
<ItemGroup>
|
2018-02-07 22:28:13 +00:00
|
|
|
<_NETStandardLibraryPackageVersions Include="@(PackageDefinitions->'%(Version)')"
|
2017-03-22 02:02:20 +00:00
|
|
|
Condition="%(PackageDefinitions.Name) == 'NetStandard.Library'" />
|
2018-02-07 22:28:13 +00:00
|
|
|
<_NETCorePlatformsPackageVersions Include="@(PackageDefinitions->'%(Version)')"
|
2018-01-20 01:15:34 +00:00
|
|
|
Condition="%(PackageDefinitions.Name) == 'Microsoft.NETCore.Platforms'" />
|
2017-03-22 02:02:20 +00:00
|
|
|
</ItemGroup>
|
|
|
|
|
2018-02-07 22:28:13 +00:00
|
|
|
<Error Condition="@(_NETStandardLibraryPackageVersions->Distinct()->Count()) != 1"
|
2017-03-22 02:02:20 +00:00
|
|
|
Text="Failed to determine the NETStandard.Library version pulled in Microsoft.NETCore.App" />
|
2018-02-07 22:28:13 +00:00
|
|
|
<Error Condition="@(_NETCorePlatformsPackageVersions->Distinct()->Count()) != 1"
|
|
|
|
Text="Failed to determine the Microsoft.NETCore.Platforms version pulled in Microsoft.NETCore.App" />
|
2017-03-22 02:02:20 +00:00
|
|
|
|
|
|
|
<PropertyGroup>
|
2017-12-02 04:07:48 +00:00
|
|
|
<_NETCoreAppPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</_NETCoreAppPackageVersion>
|
2018-02-07 22:28:13 +00:00
|
|
|
<_NETStandardLibraryPackageVersion>@(_NETStandardLibraryPackageVersions->Distinct())</_NETStandardLibraryPackageVersion>
|
|
|
|
<_NETCorePlatformsPackageVersion>@(_NETCorePlatformsPackageVersions->Distinct())</_NETCorePlatformsPackageVersion>
|
2018-04-18 07:31:15 +00:00
|
|
|
<_AspNetCoreAllPackageVersion>$(MicrosoftAspNetCoreAllPackageVersion)</_AspNetCoreAllPackageVersion>
|
|
|
|
<_AspNetCoreAppPackageVersion>$(MicrosoftAspNetCoreAppPackageVersion)</_AspNetCoreAppPackageVersion>
|
2017-03-22 02:02:20 +00:00
|
|
|
|
|
|
|
<!-- Use only major and minor in target framework version -->
|
|
|
|
<_NETCoreAppTargetFrameworkVersion>$(_NETCoreAppPackageVersion.Split('.')[0]).$(_NETCoreAppPackageVersion.Split('.')[1])</_NETCoreAppTargetFrameworkVersion>
|
2018-02-07 22:28:13 +00:00
|
|
|
<_NETStandardTargetFrameworkVersion>$(_NETStandardLibraryPackageVersion.Split('.')[0]).$(_NETStandardLibraryPackageVersion.Split('.')[1])</_NETStandardTargetFrameworkVersion>
|
2018-04-18 07:31:15 +00:00
|
|
|
<_AspNetCoreAllTargetFrameworkVersion>$(_NETCoreAppTargetFrameworkVersion)</_AspNetCoreAllTargetFrameworkVersion>
|
|
|
|
<_AspNetCoreAppTargetFrameworkVersion>$(_AspNetCoreAllTargetFrameworkVersion)</_AspNetCoreAppTargetFrameworkVersion>
|
2017-03-22 02:02:20 +00:00
|
|
|
|
2018-05-14 20:43:09 +00:00
|
|
|
<_NETCoreSdkIsPreview Condition=" '$(DropSuffix)' != 'true' ">true</_NETCoreSdkIsPreview>
|
2018-05-01 00:49:09 +00:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
<BundledVersionsVariable Include="BundledAspNetCoreAllTargetFrameworkVersion" Value="$(_AspNetCoreAllTargetFrameworkVersion)" />
|
|
|
|
<BundledVersionsVariable Include="BundledAspNetCoreAllPackageVersion" Value="$(_AspNetCoreAllPackageVersion)" />
|
|
|
|
<BundledVersionsVariable Include="BundledAspNetCoreAppTargetFrameworkVersion" Value="$(_AspNetCoreAppTargetFrameworkVersion)" />
|
|
|
|
<BundledVersionsVariable Include="BundledAspNetCoreAppPackageVersion" Value="$(_AspNetCoreAppPackageVersion)" />
|
|
|
|
</ItemGroup>
|
2018-02-17 05:56:03 +00:00
|
|
|
|
2018-05-01 00:49:09 +00:00
|
|
|
<ItemGroup Condition=" '$(IncludeAspNetCoreRuntime)' == 'false' ">
|
|
|
|
<!--
|
|
|
|
These properties indicate that the ASP.NET Core shared runtime is not bundled on this platform, so the SDK should not
|
|
|
|
treat these packages as the 'platform' base.
|
|
|
|
|
|
|
|
The bundled aspnet packages versions should still be set, however, so the default, version-less PackageReference
|
|
|
|
still works.
|
|
|
|
See also https://github.com/aspnet/Universe/pull/1130.
|
|
|
|
-->
|
|
|
|
<BundledVersionsVariable Include="_AspNetCoreAppSharedFxIsEnabled" Value="false" />
|
|
|
|
<BundledVersionsVariable Include="_AspNetCoreAllSharedFxIsEnabled" Value="false" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
2017-03-22 02:02:20 +00:00
|
|
|
<BundledVersionsPropsContent>
|
|
|
|
<![CDATA[
|
|
|
|
<!--
|
|
|
|
***********************************************************************************************
|
|
|
|
$(BundledVersionsPropsFileName)
|
|
|
|
|
|
|
|
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
|
|
|
|
created a backup copy. Incorrect changes to this file will make it
|
|
|
|
impossible to load or build your projects from the command-line or the IDE.
|
|
|
|
|
|
|
|
Copyright (c) .NET Foundation. All rights reserved.
|
|
|
|
***********************************************************************************************
|
|
|
|
-->
|
|
|
|
<Project>
|
|
|
|
<PropertyGroup>
|
|
|
|
<BundledNETCoreAppTargetFrameworkVersion>$(_NETCoreAppTargetFrameworkVersion)</BundledNETCoreAppTargetFrameworkVersion>
|
|
|
|
<BundledNETCoreAppPackageVersion>$(_NETCoreAppPackageVersion)</BundledNETCoreAppPackageVersion>
|
|
|
|
<BundledNETStandardTargetFrameworkVersion>$(_NETStandardTargetFrameworkVersion)</BundledNETStandardTargetFrameworkVersion>
|
2018-02-07 22:28:13 +00:00
|
|
|
<BundledNETStandardPackageVersion>$(_NETStandardLibraryPackageVersion)</BundledNETStandardPackageVersion>
|
|
|
|
<BundledNETCorePlatformsPackageVersion>$(_NETCorePlatformsPackageVersion)</BundledNETCorePlatformsPackageVersion>
|
2018-05-01 00:49:09 +00:00
|
|
|
@(BundledVersionsVariable->'<%(Identity)>%(Value)</%(Identity)>', '%0A ')
|
2018-02-17 05:56:03 +00:00
|
|
|
<NETCoreSdkVersion>$(SdkVersion)</NETCoreSdkVersion>
|
|
|
|
<_NETCoreSdkIsPreview>$(_NETCoreSdkIsPreview)</_NETCoreSdkIsPreview>
|
2018-04-18 07:31:15 +00:00
|
|
|
|
2018-03-28 03:26:00 +00:00
|
|
|
<!-- Latest patch versions for each minor version of .NET Core -->
|
2018-04-17 00:07:57 +00:00
|
|
|
<LatestPatchVersionForNetCore1_0 Condition="'$(LatestPatchVersionForNetCore1_0)' == ''">1.0.11</LatestPatchVersionForNetCore1_0>
|
|
|
|
<LatestPatchVersionForNetCore1_1 Condition="'$(LatestPatchVersionForNetCore1_1)' == ''">1.1.8</LatestPatchVersionForNetCore1_1>
|
|
|
|
<LatestPatchVersionForNetCore2_0 Condition="'$(LatestPatchVersionForNetCore2_0)' == ''">2.0.7</LatestPatchVersionForNetCore2_0>
|
2017-03-22 02:02:20 +00:00
|
|
|
</PropertyGroup>
|
|
|
|
</Project>
|
|
|
|
]]>
|
|
|
|
</BundledVersionsPropsContent>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
2017-04-28 06:05:48 +00:00
|
|
|
<MakeDir Directories="$(GeneratedMSBuildExtensionsDirectory)" />
|
|
|
|
<WriteLinesToFile File="$(GeneratedMSBuildExtensionsDirectory)/$(BundledVersionsPropsFileName)"
|
2017-03-22 02:02:20 +00:00
|
|
|
Lines="$(BundledVersionsPropsContent)"
|
|
|
|
Overwrite="true" />
|
|
|
|
</Target>
|
2018-03-19 19:31:16 +00:00
|
|
|
|
|
|
|
<Target Name="GenerateBundledCliToolsProps">
|
|
|
|
<PropertyGroup>
|
|
|
|
<BundledBundledCliToolsPropsFileName>Microsoft.NETCoreSdk.BundledCliTools.props</BundledBundledCliToolsPropsFileName>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<BundledBundledCliToolsPropsContent>
|
|
|
|
<![CDATA[
|
|
|
|
<!--
|
|
|
|
***********************************************************************************************
|
|
|
|
$(BundledBundledCliToolsPropsFileName)
|
|
|
|
|
|
|
|
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
|
|
|
|
created a backup copy. Incorrect changes to this file will make it
|
|
|
|
impossible to load or build your projects from the command-line or the IDE.
|
|
|
|
|
|
|
|
Copyright (c) .NET Foundation. All rights reserved.
|
|
|
|
***********************************************************************************************
|
|
|
|
-->
|
|
|
|
<Project>
|
|
|
|
<ItemGroup>
|
|
|
|
@(BundledDotnetTools->HasMetadata('ObsoletesCliTool')->' %3CBundledDotNetCliToolReference Include="%(ObsoletesCliTool)" /%3E','%0A')
|
|
|
|
</ItemGroup>
|
|
|
|
</Project>
|
|
|
|
]]>
|
|
|
|
</BundledBundledCliToolsPropsContent>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<MakeDir Directories="$(GeneratedMSBuildExtensionsDirectory)" />
|
|
|
|
<WriteLinesToFile File="$(GeneratedMSBuildExtensionsDirectory)/$(BundledBundledCliToolsPropsFileName)"
|
|
|
|
Lines="$(BundledBundledCliToolsPropsContent)"
|
|
|
|
Overwrite="true" />
|
|
|
|
</Target>
|
2017-03-22 02:02:20 +00:00
|
|
|
</Project>
|