question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support C# 10 in XamariniOS@2 task

See original GitHub issue

Required 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"

Desired functionality: Have some way of choosing the version of MSBuild included in Visual Studio Mac.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
vmapetrcommented, Jun 13, 2022

@benlings Thanks for reporting! We are working on more prioritized issues now but will get back to this one soon

0reactions
wesleyscaldwellcommented, Sep 1, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found