Skip to content

Commit 0d27b09

Browse files
authored
React to MSBuild Traversal and NoTargets SDK updates (dotnet#52895)
* Remove custom rebuild entry point in Build.proj The rebuild target was added into the Traversal SDK here: microsoft/MSBuildSdks@fd7660d#diff-ad560c0828c6bab536a01e43bb052bfce14a959b8df2c3f89cccfca0b399681c * Update global.json * Update global.json * Update native-binplace.proj * Update externals.csproj * Update native-binplace.proj * Update native-binplace.proj * Default tfm for NoTargets projects * Don't run GenFacades on ApiCompat.proj * ApiCompat fix and packaging cleanup * Fixes * Only set if not multi-targeting
1 parent 9796ac9 commit 0d27b09

25 files changed

+53
-77
lines changed

Build.proj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
<ProjectReference Include="$(RepoTasksDir)tasks.proj" Condition="'$(MSBuildRestoreSessionId)' != ''" />
88
</ItemGroup>
99

10-
<!-- Custom arcade target which isn't available in Microsoft.Build.Traversal. -->
11-
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
12-
1310
<Import Project="$(RepositoryEngineeringDir)SubsetValidation.targets" />
1411

1512
<!-- Upfront restore hooks -->
@@ -21,4 +18,4 @@
2118
<MSBuild Projects="$(RepoTasksDir)tasks.proj"
2219
Targets="BuildIncrementally" />
2320
</Target>
24-
</Project>
21+
</Project>

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@
278278
</PropertyGroup>
279279

280280
<PropertyGroup>
281+
<CustomBeforeNoTargets>$(RepositoryEngineeringDir)NoTargetsSdk.BeforeTargets.targets</CustomBeforeNoTargets>
281282
<CustomAfterTraversalProps>$(RepositoryEngineeringDir)TraversalSdk.AfterProps.props</CustomAfterTraversalProps>
282283
</PropertyGroup>
283284
</Project>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<!-- NoTargets SDK needs a TFM set. Use the latest .NETCoreApp TFM that is supported by the SDK.
5+
Only set a default if the project isn't multi-targeting. -->
6+
<TargetFramework Condition="'$(TargetFramework)' == '' and '$(TargetFrameworks)' == ''">$(NetCoreAppToolCurrent)</TargetFramework>
7+
</PropertyGroup>
8+
9+
</Project>

eng/regenerate-download-table.proj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<Project Sdk="Microsoft.Build.NoTargets">
2-
<PropertyGroup>
3-
<TargetFramework>netstandard2.0</TargetFramework>
4-
</PropertyGroup>
52

63
<!-- installer.tasks needs to be built in advance. -->
74
<UsingTask TaskName="RegenerateDownloadTable" AssemblyFile="$(InstallerTasksAssemblyPath)" />

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21264.2",
1717
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21264.2",
1818
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.21264.2",
19-
"Microsoft.Build.NoTargets": "2.0.17",
20-
"Microsoft.Build.Traversal": "2.1.1",
19+
"Microsoft.Build.NoTargets": "3.0.4",
20+
"Microsoft.Build.Traversal": "3.0.23",
2121
"Microsoft.NET.Sdk.IL": "6.0.0-preview.5.21267.1"
2222
}
2323
}

src/coreclr/crossgen-corelib.proj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
<Project Sdk="Microsoft.Build.NoTargets">
2-
<PropertyGroup>
3-
<!-- NoTargets SDK needs a TFM set. So we used the latest .NETCoreApp supported one. -->
4-
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
5-
</PropertyGroup>
62

73
<Target Name="PrepareForCrossgen">
84
<PropertyGroup>

src/coreclr/runtime.proj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
<Project Sdk="Microsoft.Build.NoTargets">
2-
<PropertyGroup>
3-
<!-- NoTargets SDK needs a TFM set. So we used the latest .NETCoreApp supported one. -->
4-
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
5-
</PropertyGroup>
62

73
<Target Name="BuildRuntime"
84
AfterTargets="Build">

src/installer/corehost.proj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
package's targets into the build.
66
-->
77
<PropertyGroup>
8-
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
98
<IncrementalNativeBuild Condition="'$(IncrementalNativeBuild)' == ''">true</IncrementalNativeBuild>
109
<BuildCoreHostDependsOn>GetProductVersions;GenerateNativeVersionFile</BuildCoreHostDependsOn>
1110
<BuildCoreHostDependsOn Condition="'$(DisableSourceLink)' != 'true'">$(BuildCoreHostDependsOn);InitializeSourceControlInformationFromSourceControlManager</BuildCoreHostDependsOn>

src/installer/prepare-artifacts.proj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<Project Sdk="Microsoft.Build.NoTargets">
22
<PropertyGroup>
3-
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
4-
53
<!-- Set IsStableBuild to mimic https://github.com/dotnet/arcade/blob/694d59f090b743f894779d04a7ffe11cbaf352e7/src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj#L30-L31 -->
64
<IsStableBuild>false</IsStableBuild>
75
<IsStableBuild Condition="'$(DotNetFinalVersionKind)' == 'release'">true</IsStableBuild>

src/libraries/Directory.Build.targets

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,16 @@
6666
<BinPlaceRef Condition="'$(BinPlaceRef)' == '' and ('$(IsReferenceAssembly)' == 'true' or '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRef>
6767
<BinPlaceRuntime Condition="'$(BinPlaceRuntime)' == '' and ('$(IsRuntimeAssembly)' == 'true' or '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRuntime>
6868
<BinPlaceForTargetVertical Condition="'$(BinPlaceForTargetVertical)' == ''">true</BinPlaceForTargetVertical>
69+
<GetBinPlaceItemsDependsOn Condition="$(MSBuildProjectName.StartsWith('Microsoft.Extensions.'))">$(GetBinPlaceItemsDependsOn);AddDocumentationFileAsBinPlaceItemForExtensionsProjects</GetBinPlaceItemsDependsOn>
6970
</PropertyGroup>
7071

71-
<ItemGroup Condition="$(MSBuildProjectName.StartsWith('Microsoft.Extensions.'))">
72-
<!-- Microsoft.Extensions are not yet using the doc-file package -->
73-
<BinPlaceItem Include="$(DocumentationFile)" />
74-
</ItemGroup>
72+
<Target Name="AddDocumentationFileAsBinPlaceItemForExtensionsProjects"
73+
Condition="Exists('$(DocumentationFile)')">
74+
<ItemGroup>
75+
<!-- Microsoft.Extensions are not yet using the doc-file package -->
76+
<BinPlaceItem Include="$(DocumentationFile)" />
77+
</ItemGroup>
78+
</Target>
7579

7680
<ItemGroup Condition="'@(BinPlaceTargetFrameworks)' == ''">
7781
<!-- binplace to directories for the target vertical -->

0 commit comments

Comments
 (0)