-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update desktop Mono to 6.12.0.137 and MSBuild 16.9 #5806
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Context: #5806 Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=4614104&view=logs&j=96fd57f5-f69e-53c7-3d47-f67e6cf9b93e&t=9492f091-fb29-57d7-1f68-ecbf86da9c24 PR #5806 (currently a draft) bumped the system mono and msbuild on various CI machines. As these machines are *not* VMs, and do *not* "start from clean" for every PR build (for performance reasons), the inadvertent result is that *every subsequent build* on these machines now *fails* when packing our workload .nupkg files: /Users/builder/.dotnet/sdk/5.0.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(141,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 6.0. Either target .NET Core 5.0 or lower, or use a version of the .NET SDK that supports .NET Core 6.0. [/Users/builder/azdo/_work/1/s/xamarin-android/build-tools/create-packs/Microsoft.Android.Sdk.proj] The target framework used by the projects that create our workload packs should not matter; they do not need to be `net6.0`. Update `$(TargetFramework)` to `netstandard2.0`, which improves compatibility when restoring, packing, or otherwise using these projects to invoke other targets. The `$(TargetFramework)` value *does* end up in the `.nuspec` file in these packages however, but we can prevent this by setting the [`$(SuppressDependenciesWhenPacking)` property][0] to true: <SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking> Finally, these packages use the DotnetPlatform or Template PackageType and are not intended to be functional NuGets. We can suppress certain nuspec related warnings to clean up build output: …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below: …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5128: - Add lib or ref assemblies for the netstandard2.0 target framework …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5130: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder have compatible matches, but not exact matches in the other location. Unless intentional, consult the list of actions below: …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5130: - Add a dependency group for net6.0 to the nuspec …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: References were found in the nuspec, but some reference assemblies were not found in both the nuspec and ref folder. Add the following reference assemblies: …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: - Add Java.Interop.dll to the net6.0 reference group in the nuspec …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: - Add Mono.Android.dll to the net6.0 reference group in the nuspec …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: - Add Mono.Android.Export.dll to the net6.0 reference group in the nuspec …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: - Add mono.android.jar to the net6.0 reference group in the nuspec …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: - Add mono.android.dex to the net6.0 reference group in the nuspec …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: - Add AndroidApiInfo.xml to the net6.0 reference group in the nuspec [0]: https://docs.microsoft.com/nuget/reference/msbuild-targets#pack-target-inputs
Context: #5806 Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=4614104&view=logs&j=96fd57f5-f69e-53c7-3d47-f67e6cf9b93e&t=9492f091-fb29-57d7-1f68-ecbf86da9c24 PR #5806 (currently a draft) bumped the system mono and msbuild on various CI machines. As these machines are *not* VMs, and do *not* "start from clean" for every PR build (for performance reasons), the inadvertent result is that *every subsequent build* on these machines now *fails* when packing our workload .nupkg files: /Users/builder/.dotnet/sdk/5.0.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(141,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 6.0. Either target .NET Core 5.0 or lower, or use a version of the .NET SDK that supports .NET Core 6.0. [/Users/builder/azdo/_work/1/s/xamarin-android/build-tools/create-packs/Microsoft.Android.Sdk.proj] The target framework used by the projects that create our workload packs should not matter; they do not need to be `net6.0`. Update `$(TargetFramework)` to `netstandard2.0`, which improves compatibility when restoring, packing, or otherwise using these projects to invoke other targets. The `$(TargetFramework)` value *does* end up in the `.nuspec` file in these packages however, but we can prevent this by setting the [`$(SuppressDependenciesWhenPacking)` property][0] to true: <SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking> Finally, these packages use the DotnetPlatform or Template PackageType and are not intended to be functional NuGets. We can suppress certain nuspec related warnings to clean up build output: …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below: …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5128: - Add lib or ref assemblies for the netstandard2.0 target framework …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5130: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder have compatible matches, but not exact matches in the other location. Unless intentional, consult the list of actions below: …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5130: - Add a dependency group for net6.0 to the nuspec …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: References were found in the nuspec, but some reference assemblies were not found in both the nuspec and ref folder. Add the following reference assemblies: …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: - Add Java.Interop.dll to the net6.0 reference group in the nuspec …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: - Add Mono.Android.dll to the net6.0 reference group in the nuspec …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: - Add Mono.Android.Export.dll to the net6.0 reference group in the nuspec …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: - Add mono.android.jar to the net6.0 reference group in the nuspec …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: - Add mono.android.dex to the net6.0 reference group in the nuspec …\NuGet.Build.Tasks.Pack.targets(221,5): warning NU5131: - Add AndroidApiInfo.xml to the net6.0 reference group in the nuspec [0]: https://docs.microsoft.com/nuget/reference/msbuild-targets#pack-target-inputs
bdeb5b7
to
fbbba3e
Compare
The designer integration test failures will need to be sorted out before we can merge this, I think all the other failures in the latest run were intermittent. |
Cross referencing the comment from 5773: #5773 (comment) to consider for this PR once the designer tests are fixed. |
Commit 12edc2c introduced a feature that seems to only be available in newer versions of MSBuild: <Import Project="Sdk.props" Sdk="Microsoft.DotNet.SharedFramework.Sdk" Version="$(MicrosoftDotNetBuildTasksFeedPackageVersion)" /> This caused an issue during the `dotnet_create_pkg` job on our Xamarin.Android pipeline, which uses a different machine pool than Xamarin.Android-PR: /Users/builder/azdo/_work/2/s/xamarin-android/build-tools/create-packs/Directory.Build.targets(11,3): error : Version 5.0.201 of the .NET Core SDK requires at least version 16.8.0 of MSBuild. The current available version of MSBuild is 16.6.0.52201. Change the .NET Core SDK specified in global.json to an older version that requires the MSBuild version currently available. "/Users/builder/azdo/_work/2/s/xamarin-android/Xamarin.Android.sln" (CreateWorkloadInstallers target) (1) -> "/Users/builder/azdo/_work/2/s/xamarin-android/build-tools/create-packs/Microsoft.Android.Sdk.proj" (ExtractWorkloadPacks target) (2) -> /Users/builder/azdo/_work/2/s/xamarin-android/build-tools/create-packs/Directory.Build.targets(11,31): error MSB4236: The SDK 'Microsoft.DotNet.SharedFramework.Sdk/$(MicrosoftDotNetBuildTasksFeedPackageVersion)' specified could not be found. [/Users/builder/azdo/_work/2/s/xamarin-android/build-tools/create-packs/Microsoft.Android.Sdk.proj] I believe this wasn't seen on the PR bots as some of them now have the a newer mono installed which supports MSBuild 16.9 (see PR #5806, which is still waiting for designer test fixes). Fix this issue by using `dotnet build` whenever we build the `CreateWorkloadInstallers` target.
I inadvertently overlooked this PR while creating and merging PR #5841, which bumps mono without bumping the desktop ("build host"?) mono version. Consequently, the change to The desktop mono bump is still interesting, though… This PR will need to be rebased to take commit 8db45fb into consideration. |
fbbba3e
to
3df26f6
Compare
Commit 12edc2c introduced a feature that seems to only be available in newer versions of MSBuild: <Import Project="Sdk.props" Sdk="Microsoft.DotNet.SharedFramework.Sdk" Version="$(MicrosoftDotNetBuildTasksFeedPackageVersion)" /> This caused an issue during the `dotnet_create_pkg` job on our Xamarin.Android pipeline, which uses a different machine pool than Xamarin.Android-PR: /Users/builder/azdo/_work/2/s/xamarin-android/build-tools/create-packs/Directory.Build.targets(11,3): error : Version 5.0.201 of the .NET Core SDK requires at least version 16.8.0 of MSBuild. The current available version of MSBuild is 16.6.0.52201. Change the .NET Core SDK specified in global.json to an older version that requires the MSBuild version currently available. "/Users/builder/azdo/_work/2/s/xamarin-android/Xamarin.Android.sln" (CreateWorkloadInstallers target) (1) -> "/Users/builder/azdo/_work/2/s/xamarin-android/build-tools/create-packs/Microsoft.Android.Sdk.proj" (ExtractWorkloadPacks target) (2) -> /Users/builder/azdo/_work/2/s/xamarin-android/build-tools/create-packs/Directory.Build.targets(11,31): error MSB4236: The SDK 'Microsoft.DotNet.SharedFramework.Sdk/$(MicrosoftDotNetBuildTasksFeedPackageVersion)' specified could not be found. [/Users/builder/azdo/_work/2/s/xamarin-android/build-tools/create-packs/Microsoft.Android.Sdk.proj] I believe this wasn't seen on the PR bots as some of them now have the a newer mono installed which supports MSBuild 16.9 (see PR #5806, which is still waiting for designer test fixes). Fix this issue by using `dotnet build` on macOS when we build the `CreateWorkloadInstallers` target. Finally, I hit a considerable amount of disk space related issues when testing this PR which will hopefully be alleviated by migrating to the MicroBuild Virtual Machine Scale Set pool. I've also moved the Build Asset Registry manifest promotion to the end of the job so that it won't run multiple times when retrying a failed job.
fedea4b
to
7a00bf6
Compare
7a00bf6
to
2193a04
Compare
The desktop mono version has been bumped to include a major MSBuild update from 16.6 to 16.9. This MSBuild version supports net5.0, and as such it allows us to add `Microsoft.Android.Sdk.ILLink` to the `Xamarin.Android.sln` build.
2193a04
to
03c0eba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is looking OK, I restarted some of the failing tests.
The desktop mono version has been bumped to include a major MSBuild
update from 16.6 to 16.9. This MSBuild version supports net5.0, and
as such it allows us to add
Microsoft.Android.Sdk.ILLink
to theXamarin.Android.sln
build.