Skip to content

Commit 21de3d7

Browse files
[build] update $(MSBuildPackageReferenceVersion) to 17.6.3 (#221)
Context: dotnet/android#8366 dotnet/android#8366 is attempting to build xamarin-android against .NET 9 previews, and currently fails: (Restore target) -> tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.csproj : error NU1605: Warning As Error: Detected package downgrade: Microsoft.Build.Framework from 17.5.0 to 17.3.2. Reference the package directly from the project to select a different version. tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.csproj : error NU1605: MSBuildDeviceIntegration -> MSBuild.StructuredLogger 2.2.100 -> doh (>= 17.5.0) tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.csproj : error NU1605: MSBuildDeviceIntegration -> Microsoft.Build.Framework (>= 17.3.2) tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.csproj : error NU1605: Warning As Error: Detected package downgrade: Microsoft.Build.Utilities.Core from 17.5.0 to 17.3.2. Reference the package directly from the project to select a different version. tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.csproj : error NU1605: MSBuildDeviceIntegration -> MSBuild.StructuredLogger 2.2.100 -> Microsoft.Build.Utilities.Core (>= 17.5.0) tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.csproj : error NU1605: MSBuildDeviceIntegration -> Microsoft.Build.Utilities.Core (>= 17.3.2) We need to update `MSBuild.StructuredLogger` package to be able to move to .NET 9, as the `.binlog` file format changed in .NET 9. The newer `MSBuild.StructuredLogger` package, in turn, requires a newer `Microsoft.Build.Framework` package version, which is controlled here. Update the `$(MSBuildPackageReferenceVersion)` MSBuild property so that (1) it can now be overridden, which would allow version updates in the future without requiring submodule updates, and (2) update the the default value to 17.6.3. I fear that if we move to 17.8.3, we may potentially break other repos. VS 2022 17.6 is an LTS release that feels "safe", is new enough to solve the issue, and hopefully won't break anyone? Additionally, update the `System.Security.Cryptography.Xml` package so that it now uses an overridable `$(SystemSecurityCryptographyXmlVersion)` MSBuild property, which defaults to 7.0.1, in order to fix this build error: src\Microsoft.Android.Build.BaseTasks\Microsoft.Android.Build.BaseTasks.csproj : error NU1605: Detected package downgrade: System.Security.Cryptography.Xml from 7.0.1 to 6.0.1. Reference the package directly from the project to select a different version. src\Microsoft.Android.Build.BaseTasks\Microsoft.Android.Build.BaseTasks.csproj : error NU1605: Microsoft.Android.Build.BaseTasks -> Microsoft.Build.Tasks.Core 17.6.3 -> System.Security.Cryptography.Xml (>= 7.0.1) src\Microsoft.Android.Build.BaseTasks\Microsoft.Android.Build.BaseTasks.csproj : error NU1605: Microsoft.Android.Build.BaseTasks -> System.Security.Cryptography.Xml (>= 6.0.1) tests\Microsoft.Android.Build.BaseTasks-Tests\Microsoft.Android.Build.BaseTasks-Tests.csproj : error NU1605: Detected package downgrade: System.Security.Cryptography.Xml from 7.0.1 to 6.0.1. Reference the package directly from the project to select a different version. tests\Microsoft.Android.Build.BaseTasks-Tests\Microsoft.Android.Build.BaseTasks-Tests.csproj : error NU1605: Microsoft.Android.Build.BaseTasks-Tests -> Microsoft.Build.Tasks.Core 17.6.3 -> System.Security.Cryptography.Xml (>= 7.0.1) tests\Microsoft.Android.Build.BaseTasks-Tests\Microsoft.Android.Build.BaseTasks-Tests.csproj : error NU1605: Microsoft.Android.Build.BaseTasks-Tests -> System.Security.Cryptography.Xml (>= 6.0.1)
1 parent 08a6990 commit 21de3d7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Microsoft.Android.Build.BaseTasks/MSBuildReferences.projitems

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<Project>
55
<!--Import this file in projects needing to reference Microsoft.Build.*.dll -->
66
<PropertyGroup>
7-
<MSBuildPackageReferenceVersion>17.3.2</MSBuildPackageReferenceVersion>
7+
<MSBuildPackageReferenceVersion Condition=" '$(MSBuildPackageReferenceVersion)' == '' ">17.8.3</MSBuildPackageReferenceVersion>
8+
<SystemSecurityCryptographyXmlVersion Condition=" '$(SystemSecurityCryptographyXmlVersion)' == '' ">7.0.1</SystemSecurityCryptographyXmlVersion>
89
<LibZipSharpVersion Condition=" '$(LibZipSharpVersion)' == '' " >3.0.0</LibZipSharpVersion>
910
<MonoUnixVersion>7.1.0-final.1.21458.1</MonoUnixVersion>
1011
</PropertyGroup>
@@ -14,7 +15,7 @@
1415
<PackageReference Include="Microsoft.Build.Framework" Version="$(MSBuildPackageReferenceVersion)" />
1516
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MSBuildPackageReferenceVersion)" />
1617
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MSBuildPackageReferenceVersion)" />
17-
<PackageReference Include="System.Security.Cryptography.Xml" Version="6.0.1" />
18+
<PackageReference Include="System.Security.Cryptography.Xml" Version="$(SystemSecurityCryptographyXmlVersion)" />
1819
<PackageReference Include="K4os.Compression.LZ4" Version="1.1.11" />
1920
<PackageReference Include="Xamarin.Build.AsyncTask" Version="0.4.0" GeneratePathProperty="true" />
2021
<PackageReference Include="Xamarin.LibZipSharp" Version="$(LibZipSharpVersion)" GeneratePathProperty="true" />

0 commit comments

Comments
 (0)