Skip to content

Commit 63a6ed3

Browse files
Merged PR 39154: Update MSBuild dependencies
Fixes: dotnet/source-build#4344 dotnet/runtime#100595 introduced two issues: - Lower MSBuild version dependency - 17.8.3, instead of 17.8.5. This caused transitive package downgrade errors. - Source-build dependency for MSBuild, in runtime repo. This caused downgrade of MSBuild repo in VMR, from 17.8.5 to 17.8.3. Besides removing direct package references, the fix is to add a direct MSBuild source-build dependency in `installer` repo. I'm also adding the missing MSBuild dependencies to runtime, for proper PVP flow. Without the explicit dependencies, my validation build was hitting an issue with `Microsoft.Build.Framework` package downgrade in `src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.csproj`: ``` /vmr/src/runtime/artifacts/source-build/self/src/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.csproj : error NU1605: Warning As Error: Detected package downgrade: Microsoft.Build.Framework from 17.8.5 to 17.8.3. Reference the package directly from the project to select a different version. [/vmr/src/runtime/artifacts/source-build/self/src/Build.proj] /vmr/src/runtime/artifacts/source-build/self/src/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.csproj : error NU1605: Microsoft.NET.Sdk.WebAssembly.Pack.Tasks -> Microsoft.Build 17.8.5 -> Microsoft.Build.Framework (>= 17.8.5) [/vmr/src/runtime/artifacts/source-build/self/src/Build.proj] /vmr/src/runtime/artifacts/source-build/self/src/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.csproj : error NU1605: Microsoft.NET.Sdk.WebAssembly.Pack.Tasks -> Microsoft.Build.Framework (>= 17.8.3) [/vmr/src/runtime/artifacts/source-build/self/src/Build.proj] ``` Fully validated with an internal pipeline run: https://dev.azure.com/dnceng/internal/_build/results?buildId=2436369&view=results
2 parents 1e1c1f8 + e8e88de commit 63a6ed3

File tree

3 files changed

+85
-1
lines changed

3 files changed

+85
-1
lines changed

eng/Version.Details.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@
159159
<Uri>https://github.com/dotnet/msbuild</Uri>
160160
<Sha>b5265ef370a651f8c3458110b804e5cbf869eeb5</Sha>
161161
</Dependency>
162+
<Dependency Name="Microsoft.SourceBuild.Intermediate.msbuild" Version="17.8.5-preview-24055-02">
163+
<Uri>https://github.com/dotnet/msbuild</Uri>
164+
<Sha>b5265ef370a651f8c3458110b804e5cbf869eeb5</Sha>
165+
<SourceBuild RepoName="msbuild" ManagedOnly="true" />
166+
</Dependency>
162167
<Dependency Name="NuGet.Build.Tasks" Version="6.8.1-rc.2" CoherentParentDependency="Microsoft.NET.Sdk">
163168
<Uri>https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted</Uri>
164169
<Sha>550277e0616e549446f03fda35d3e23dff75dc01</Sha>

eng/pipelines/vmr-build-internal.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ variables:
2323
value: ${{ replace(parameters.vmrBranch, ' ', '') }}
2424
- ${{ else }}:
2525
- name: VmrBranch
26-
value: release/8.0.1xx
26+
value: internal/release/8.0.1xx
2727

2828
resources:
2929
repositories:
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Nikola Milosavljevic <nikolam@microsoft.com>
3+
Date: Tue, 23 Apr 2024 01:55:17 +0000
4+
Subject: [PATCH] Update MSBuild dependencies
5+
6+
Backport: https://github.com/dotnet/runtime/issues/101395
7+
---
8+
eng/Version.Details.xml | 12 ++++++++++++
9+
eng/Versions.props | 6 +++---
10+
src/tasks/AotCompilerTask/MonoAOTCompiler.csproj | 1 -
11+
src/tasks/WasmAppBuilder/WasmAppBuilder.csproj | 3 ---
12+
4 files changed, 15 insertions(+), 7 deletions(-)
13+
14+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
15+
index fe35dc0997e..b90337395f6 100644
16+
--- a/eng/Version.Details.xml
17+
+++ b/eng/Version.Details.xml
18+
@@ -414,6 +414,18 @@
19+
<Uri>https://github.com/dotnet/msbuild</Uri>
20+
<Sha>195e7f5a3a8e51c37d83cd9e54cb99dc3fc69c22</Sha>
21+
</Dependency>
22+
+ <Dependency Name="Microsoft.Build.Framework" Version="17.8.3">
23+
+ <Uri>https://github.com/dotnet/msbuild</Uri>
24+
+ <Sha>195e7f5a3a8e51c37d83cd9e54cb99dc3fc69c22</Sha>
25+
+ </Dependency>
26+
+ <Dependency Name="Microsoft.Build.Tasks.Core" Version="17.8.3">
27+
+ <Uri>https://github.com/dotnet/msbuild</Uri>
28+
+ <Sha>195e7f5a3a8e51c37d83cd9e54cb99dc3fc69c22</Sha>
29+
+ </Dependency>
30+
+ <Dependency Name="Microsoft.Build.Utilities.Core" Version="17.8.3">
31+
+ <Uri>https://github.com/dotnet/msbuild</Uri>
32+
+ <Sha>195e7f5a3a8e51c37d83cd9e54cb99dc3fc69c22</Sha>
33+
+ </Dependency>
34+
<Dependency Name="Microsoft.SourceBuild.Intermediate.msbuild" Version="17.8.3-preview-23613-06">
35+
<Uri>https://github.com/dotnet/msbuild</Uri>
36+
<Sha>195e7f5a3a8e51c37d83cd9e54cb99dc3fc69c22</Sha>
37+
diff --git a/eng/Versions.props b/eng/Versions.props
38+
index f012e409095..bf16c6ee71f 100644
39+
--- a/eng/Versions.props
40+
+++ b/eng/Versions.props
41+
@@ -173,9 +173,9 @@
42+
<MicrosoftDiagnosticsToolsRuntimeClientVersion>1.0.4-preview6.19326.1</MicrosoftDiagnosticsToolsRuntimeClientVersion>
43+
<DNNEVersion>2.0.5</DNNEVersion>
44+
<MicrosoftBuildVersion>17.8.3</MicrosoftBuildVersion>
45+
- <MicrosoftBuildTasksCoreVersion>$(MicrosoftBuildVersion)</MicrosoftBuildTasksCoreVersion>
46+
- <MicrosoftBuildFrameworkVersion>$(MicrosoftBuildVersion)</MicrosoftBuildFrameworkVersion>
47+
- <MicrosoftBuildUtilitiesCoreVersion>$(MicrosoftBuildVersion)</MicrosoftBuildUtilitiesCoreVersion>
48+
+ <MicrosoftBuildTasksCoreVersion>17.8.3</MicrosoftBuildTasksCoreVersion>
49+
+ <MicrosoftBuildFrameworkVersion>17.8.3</MicrosoftBuildFrameworkVersion>
50+
+ <MicrosoftBuildUtilitiesCoreVersion>17.8.3</MicrosoftBuildUtilitiesCoreVersion>
51+
<NugetProjectModelVersion>6.2.4</NugetProjectModelVersion>
52+
<NugetPackagingVersion>6.2.4</NugetPackagingVersion>
53+
<DotnetSosVersion>7.0.412701</DotnetSosVersion>
54+
diff --git a/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj b/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj
55+
index e76730b5aec..88ae0fb136c 100644
56+
--- a/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj
57+
+++ b/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj
58+
@@ -14,7 +14,6 @@
59+
<ItemGroup>
60+
<PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" />
61+
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCoreVersion)" />
62+
- <PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" />
63+
</ItemGroup>
64+
<ItemGroup>
65+
<Compile Include="MonoAOTCompiler.cs" />
66+
diff --git a/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj b/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj
67+
index 34a51095986..d8c95954dd8 100644
68+
--- a/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj
69+
+++ b/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj
70+
@@ -24,9 +24,6 @@
71+
72+
<PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" />
73+
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCoreVersion)" />
74+
- <!-- FIXME: is this the correct version of SRM to use when building for .NET Framework? -->
75+
- <PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" />
76+
- <PackageReference Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" />
77+
</ItemGroup>
78+
79+
<ItemGroup>

0 commit comments

Comments
 (0)