|
6 | 6 |
|
7 | 7 | <Target Name="PublishPortableRuntimeIdentifierGraph" |
8 | 8 | BeforeTargets="Build"> |
9 | | - |
10 | 9 | <Copy SourceFiles="$(NuGetPackageRoot)/microsoft.netcore.platforms/$(MicrosoftNETCorePlatformsPackageVersion)/runtime.json" |
11 | 10 | DestinationFiles="$(OutputPath)RuntimeIdentifierGraph.json" |
12 | 11 | SkipUnchangedFiles="true" /> |
13 | 12 |
|
14 | 13 | <Copy SourceFiles="$(NuGetPackageRoot)/microsoft.netcore.platforms/$(MicrosoftNETCorePlatformsPackageVersion)/PortableRuntimeIdentifierGraph.json" |
15 | 14 | DestinationFolder="$(OutputPath)" |
16 | 15 | SkipUnchangedFiles="true" /> |
17 | | - |
18 | 16 | </Target> |
19 | 17 |
|
20 | 18 | <Target Name="PublishVersionFile" |
21 | 19 | BeforeTargets="Build"> |
22 | | - |
23 | 20 | <WriteLinesToFile File="$(OutputPath)/.toolsetversion" |
24 | 21 | Lines="$(SourceRevisionId);$(Version);$(Rid)" |
25 | 22 | Overwrite="true" /> |
|
35 | 32 | The resolution of the product version (https://github.com/dotnet/sdk/blob/main/src/Cli/Microsoft.DotNet.Cli.Utils/DotnetFiles.cs#L21) |
36 | 33 | then need the version file there as well. --> |
37 | 34 | <Copy SourceFiles="$(OutputPath)/.version" DestinationFiles="$(BaseOutputPath)$(Configuration)/.version" SkipUnchangedFiles="true" /> |
38 | | - |
39 | | - |
40 | 35 | </Target> |
41 | 36 |
|
42 | 37 | <Target Name="PublishRoslyn" |
|
57 | 52 |
|
58 | 53 | <Target Name="PublishNETAnalyzers" |
59 | 54 | BeforeTargets="Build;PublishNetSdk"> |
60 | | - <PropertyGroup> |
| 55 | + <PropertyGroup> |
61 | 56 | <AnalyzerAssembliesDirectory>$(ArtifactsBinDir)$(Configuration)\Sdks\Microsoft.NET.Sdk\analyzers</AnalyzerAssembliesDirectory> |
62 | 57 | <AnalyzerTargetsDirectory>$(AnalyzerAssembliesDirectory)\build</AnalyzerTargetsDirectory> |
63 | 58 | <AnalyzerConfigDirectory>$(AnalyzerTargetsDirectory)\config</AnalyzerConfigDirectory> |
|
123 | 118 | <Copy SourceFiles="@(DotnetFormatConfigFiles)" DestinationFiles="@(DotnetFormatConfigFiles->'$(DotnetFormatDestinationDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" /> |
124 | 119 | </Target> |
125 | 120 |
|
126 | | - <Target Name="PublishMSBuildExtensions" |
127 | | - DependsOnTargets="GenerateMSBuildExtensions" |
128 | | - BeforeTargets="Build"> |
| 121 | + <Target Name="PublishMSBuildExtensions"> |
| 122 | + <PropertyGroup> |
| 123 | + <MSBuildExtensionsPackageName>Microsoft.NET.Build.Extensions</MSBuildExtensionsPackageName> |
| 124 | + <MSBuildExtensionsVersionSubfolder>Current</MSBuildExtensionsVersionSubfolder> |
| 125 | + <MSBuildExtensionsSourceRoot>$(ArtifactsBinDir)$(Configuration)\Sdks\$(MSBuildExtensionsPackageName)</MSBuildExtensionsSourceRoot> |
| 126 | + </PropertyGroup> |
| 127 | + |
| 128 | + <ItemGroup> |
| 129 | + <!-- Include MSBuild imports that are checked into repo --> |
| 130 | + <MSBuildExtensionsContent Include="$(MSBuildProjectDirectory)/MSBuildImports/**/*" /> |
| 131 | + <MSBuildExtensionsContent Include="$(MSBuildExtensionsSourceRoot)\msbuildExtensions\**\*.*" /> |
| 132 | + |
| 133 | + <!-- Don't include .NET Framework MS.NET.Build.Extensions tasks in CLI layout --> |
| 134 | + <MSBuildExtensionsContent Remove="$(MSBuildExtensionsSourceRoot)\msbuildExtensions\Microsoft\Microsoft.NET.Build.Extensions\tools\net472\**" /> |
| 135 | + |
| 136 | + <MSBuildExtensionsContent Include="$(MSBuildExtensionsSourceRoot)\msbuildExtensions-ver\**\*.*" |
| 137 | + DeploymentSubpath="$(MSBuildExtensionsVersionSubfolder)/" /> |
| 138 | + </ItemGroup> |
| 139 | + |
129 | 140 | <Copy SourceFiles="@(MSBuildExtensionsContent)" |
130 | 141 | DestinationFiles="@(MSBuildExtensionsContent->'$(OutputPath)\%(DeploymentSubpath)\%(RecursiveDir)%(Filename)%(Extension)')" /> |
131 | | - |
132 | 142 | </Target> |
133 | 143 |
|
134 | 144 | <Target Name="PublishNetSdks" |
|
396 | 406 | AssetPath="%(NuPkgContentForMSBuildExtensionsRelativePaths.Identity)" /> |
397 | 407 | </Target> |
398 | 408 |
|
399 | | - <Target Name="PublishSdks" |
400 | | - AfterTargets="Build"> |
401 | | - <ItemGroup> |
402 | | - <SdksToBundle Include="targets\RestoreDependency.proj"> |
403 | | - <Properties> |
404 | | - NuGetPackageRoot=$(NuGetPackageRoot); |
405 | | - SdkLayoutDirectory=$(OutputPath)/Sdks/%(BundledSdk.Identity); |
406 | | - DependencyPackageName=%(BundledSdk.Identity); |
407 | | - DependencyPackageVersion=%(BundledSdk.Version); |
408 | | - PreviousStageDirectory=$(PreviousStageDirectory) |
409 | | - </Properties> |
410 | | - </SdksToBundle> |
411 | | - </ItemGroup> |
412 | | - |
413 | | - <MSBuild |
414 | | - BuildInParallel="False" |
415 | | - Projects="@(SdksToBundle)"> |
416 | | - </MSBuild> |
417 | | - |
418 | | - <!-- The WPF SDK .nupkg includes some files in the root that we don't want to bundle, so delete them --> |
419 | | - <ItemGroup> |
420 | | - <SDKFilesToDelete Include="$(OutputPath)/Sdks/Microsoft.NET.Sdk.Wpf/*" /> |
421 | | - <SDKFilesToDelete Include="$(OutputPath)/Sdks/**/*.nupkg.metadata" /> |
422 | | - <SDKFilesToDelete Include="$(OutputPath)/Sdks/**/*.signature.p7s" /> |
423 | | - </ItemGroup> |
424 | | - <Delete Files="@(SDKFilesToDelete)" /> |
425 | | - </Target> |
426 | | - |
427 | 409 | <Target Name="ChmodPublishDir" |
428 | 410 | AfterTargets="GenerateCliRuntimeConfigurationFiles" |
429 | 411 | Condition=" '$(OSName)' != 'win' "> |
|
487 | 469 | RetargetTools; |
488 | 470 | GetDotnetWatchRedistOutputDirectory" |
489 | 471 | AfterTargets="Build"> |
490 | | - <PropertyGroup> |
491 | | - <SdkLayoutOutputDirectory>$(BaseOutputPath)$(Configuration)\layouts\$(ArtifactNameSdk)</SdkLayoutOutputDirectory> |
492 | | - </PropertyGroup> |
493 | | - |
494 | 472 | <ItemGroup> |
495 | 473 | <ToolsetLayoutInput Include="$(OutputPath)/**/*" /> |
496 | 474 | <!-- Include redist outputs published by dotnet-watch.csproj build. --> |
|
0 commit comments