Support C# 10 in XamariniOS@2 task
See original GitHub issueRequired Information
Type: Feature
Enter Task Name: XamariniOS
Environment
-
Server - Azure Pipelines
-
Agent - Hosted
Issue Description
The XamariniOS task uses the Mono version of MSBuild, which doesn’t support C#10. The Hosted build agents in Azure Pipelines have Visual Studio 2022 for Mac installed. It is possible to use Mono to run the VS2022 version of MSBuild, which does support C#10. However, it doesn’t seem like it’s possible to configure the XamariniOS
task to do this.
I have tried the following:
- specify the following as an
input
parameter to the task:
buildToolLocation: '/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono "/Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/MSBuild.dll"'
This resulted in the error
Not found build tool: /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono "/Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/MSBuild.dll"
- The workaround described here: https://medium.com/@tarmopr/how-to-fix-ci-build-with-azure-hosted-agent-for-xamarin-ios-project-that-uses-c-10-cc050ba7d459 .
Desired functionality: Have some way of choosing the version of MSBuild included in Visual Studio Mac.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to fix CI build with Azure Hosted Agent for Xamarin iOS ...
I had trouble to get iOS build task working with C# lang version 10 ... It was not possible to build with newer...
Read more >VSBuild@1 - Visual Studio build v1 task - Microsoft Learn
Use this task to build with MSBuild and set the Visual Studio version property. Learn more about installing Visual Studio images on Azure....
Read more >How to create Build Task for C#10 / .NET 6.0 project in Azure ...
When I open the pipeline to change the MSBuild or Visual Studio version to be used in the build task, I can only...
Read more >'Microsoft.Build.Tasks.Copy' not supported on iOS
Tasks.Copy' threw an exception. PlatformNotSupportedException: Operation is not supported on this platform. Sentry.iOS 2>C:\Program Files (x86)\Microsoft ...
Read more >Incompatible versions of Mono MSBuild and .NET Core SDK ...
Sdk.targets(124, 5): [MSB4018] The "GenerateDepsFile" task failed unexpectedly. System. ... Screenshot_2019-07-10_at_14.08.29.png.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@benlings Thanks for reporting! We are working on more prioritized issues now but will get back to this one soon
Yeah I bit the bullet and upgraded the project to Maui, which in some places was easier than expected. But I ran into several little bugs that made the upgrade extremely time consuming.
I found that once you have the upgrade completed successfully and all your plugins and extensions upgraded correctly it works, but trying to diagnose what wasn’t working took a lot longer than expected. The error messages were pretty misleading, I spent a lot of time trying to resolve symptoms and not the actual root issues.
I also had inconsistent issues with shell between platforms.