|
1 | 1 | <Project> |
| 2 | + <Import Project="BundledDotnetTools.props" /> |
| 3 | + |
2 | 4 | <Target Name="GenerateMSBuildExtensions" |
3 | | - DependsOnTargets="GenerateBundledVersionsProps;RestoreMSBuildExtensionsPackages"> |
| 5 | + DependsOnTargets="GenerateBundledVersionsProps;GenerateBundledCliToolsProps;RestoreMSBuildExtensionsPackages"> |
4 | 6 |
|
5 | 7 | <ItemGroup> |
6 | | - |
| 8 | + |
7 | 9 | <!-- The MSBuildExtensionsContent item is for the files that will be laid out in the CLI install --> |
8 | 10 | <MSBuildExtensionsContent Include="$(GeneratedMSBuildExtensionsDirectory)/**/*" /> |
9 | 11 |
|
10 | 12 | <!-- We want to include the tasks and targets from the Microsoft.NET.Build.Extensions package, but we don't want to include the DLLs |
11 | 13 | from that package under the net461, net462, etc folders. That is because they come from the NETStandard.Library.NETFramework |
12 | 14 | 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) |
13 | 15 | if we need to update them. |
14 | | - |
| 16 | +
|
15 | 17 | https://github.com/dotnet/sdk/issues/1324 has been filed to exclude these from the Microsoft.NET.Build.Extensions package when |
16 | 18 | we generate it. |
17 | 19 | --> |
18 | 20 | <MSBuildExtensionsContent Include="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions\**\*.*" |
19 | 21 | Exclude="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions\Microsoft\Microsoft.NET.Build.Extensions\net*\**" /> |
20 | | - |
| 22 | + |
21 | 23 | <!-- Don't include .NET Framework MS.NET.Build.Extensions tasks in CLI layout --> |
22 | 24 | <MSBuildExtensionsContent Remove="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions\Microsoft\Microsoft.NET.Build.Extensions\tools\net46\**" /> |
23 | 25 |
|
24 | 26 | <MSBuildExtensionsContent Include="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions-ver\**\*.*" |
25 | 27 | DeploymentSubpath="$(MSBuildExtensionsVersionSubfolder)/" /> |
26 | | - |
| 28 | + |
27 | 29 | <MSBuildExtensionsContent Include="$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.*" |
28 | 30 | Exclude="$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.props;$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.targets" |
29 | 31 | DeploymentSubpath="Microsoft/Microsoft.NET.Build.Extensions/" /> |
|
68 | 70 | <ItemGroup> |
69 | 71 | <ExtensionPackageToRestore Include="$(MSBuildExtensionsPackageName)" Version="$(MicrosoftNETBuildExtensionsPackageVersion)"/> |
70 | 72 | <ExtensionPackageToRestore Include="$(NETStandardLibraryNETFrameworkPackageName)" Version="$(CLI_NETStandardLibraryNETFrameworkVersion)"/> |
71 | | - |
| 73 | + |
72 | 74 | <ExtensionRestore Include="$(RepoRoot)/build/RestoreDependency.proj"> |
73 | 75 | <Properties> |
74 | 76 | CLIBuildDll=$(CLIBuildDll); |
|
91 | 93 | <BundledVersionsPropsFileName>Microsoft.NETCoreSdk.BundledVersions.props</BundledVersionsPropsFileName> |
92 | 94 | </PropertyGroup> |
93 | 95 |
|
94 | | - <!-- |
| 96 | + <!-- |
95 | 97 | The bundled version of Microsoft.NETCore.App is determined statically from DependencyVersions.props whereas the bundled version |
96 | 98 | of NETStandard.Library is defined by what Microsoft.NETCore.App pulls in. This digs in to the package resolution items of |
97 | 99 | of our build against Microsoft.NETCore.App to find the correct NETStandard.Library version |
@@ -152,4 +154,38 @@ Copyright (c) .NET Foundation. All rights reserved. |
152 | 154 | Lines="$(BundledVersionsPropsContent)" |
153 | 155 | Overwrite="true" /> |
154 | 156 | </Target> |
| 157 | + |
| 158 | + <Target Name="GenerateBundledCliToolsProps"> |
| 159 | + <PropertyGroup> |
| 160 | + <BundledBundledCliToolsPropsFileName>Microsoft.NETCoreSdk.BundledCliTools.props</BundledBundledCliToolsPropsFileName> |
| 161 | + </PropertyGroup> |
| 162 | + |
| 163 | + <PropertyGroup> |
| 164 | + <BundledBundledCliToolsPropsContent> |
| 165 | +<![CDATA[ |
| 166 | +<!-- |
| 167 | +*********************************************************************************************** |
| 168 | +$(BundledBundledCliToolsPropsFileName) |
| 169 | +
|
| 170 | +WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
| 171 | + created a backup copy. Incorrect changes to this file will make it |
| 172 | + impossible to load or build your projects from the command-line or the IDE. |
| 173 | +
|
| 174 | +Copyright (c) .NET Foundation. All rights reserved. |
| 175 | +*********************************************************************************************** |
| 176 | +--> |
| 177 | +<Project> |
| 178 | + <ItemGroup> |
| 179 | +@(BundledDotnetTools->HasMetadata('ObsoletesCliTool')->' %3CBundledDotNetCliToolReference Include="%(ObsoletesCliTool)" /%3E','%0A') |
| 180 | + </ItemGroup> |
| 181 | +</Project> |
| 182 | +]]> |
| 183 | + </BundledBundledCliToolsPropsContent> |
| 184 | + </PropertyGroup> |
| 185 | + |
| 186 | + <MakeDir Directories="$(GeneratedMSBuildExtensionsDirectory)" /> |
| 187 | + <WriteLinesToFile File="$(GeneratedMSBuildExtensionsDirectory)/$(BundledBundledCliToolsPropsFileName)" |
| 188 | + Lines="$(BundledBundledCliToolsPropsContent)" |
| 189 | + Overwrite="true" /> |
| 190 | + </Target> |
155 | 191 | </Project> |
0 commit comments