Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The build was cancelled because another Xamarin operation is running. Please try again in a moment

I can't find any solution to this problem.

I had built my project in Release mode. When I changed to Debug mode and tried to rebuild the project, I got this error. And I KEEP getting this error no matter what I do.

I cleaned the project. No joy. Restarted VS2019. No joy. Deleted the bin and obj folders. No joy.

Switched back to Release mode. No joy.

The boss is waiting for this project and I can't build it because of this stupid unspecified error.

"...Another Xamarin operation is running..."

WHAT OPERATION???!!! How can I cancel that operation?

I rebooted the computer. No joy.

I own the paid version of Visual Studio Professional and this is not ok!!

Edit: I opened another version of the same project. This built ok.

Reopened the problem project and did not get the error.

Just wasted 2 hours on this

like image 537
Alan Avatar asked Mar 30 '21 02:03

Alan


People also ask

Why was my Xamarin build cancelled?

The build was cancelled because another Xamarin operation is running. Please try again in a moment Ask Question Asked10 months ago Active5 months ago Viewed5k times 23 I can't find any solution to this problem.

Do I need the Xamarin build host from older versions?

The Xamarin Build Host from older versions of Xamarin.iOS is no longer required. Visual Studio now automatically deploys the agent over Remote Login and runs it in the background.

Why can’t I run Xamarin on Visual Studio 2017?

Check that you have compatible Xamarin.iOS versions installed on your Mac. To do this with Visual Studio 2017 ensure that you are on the Stable distribution channel in Visual Studio for Mac. In Visual Studio 2015 and earlier make sure that you are on the same distribution channel on both IDEs.

What is error 3 in Xamarin release build?

3 Xamarin Release Build is erroring with Failed to resolve System.Void Xamarin.Forms.Log::Warning(System.String,System.String) 0 Xamarin the type 'CollectionView' was not found


5 Answers

A workaround is :

  • Unload the Android project
  • Clean the solution
  • Reload the android project and restore it as Startup project

Now you can clean the solution and rebuild.

like image 122
Lahna200 Avatar answered Oct 17 '22 21:10

Lahna200


Unload the given project
Reload the given project
Clean the given project
Build

Solved.

like image 31
Zoli Avatar answered Oct 17 '22 23:10

Zoli


Apart from restarting you may also need to delete bin and obj folders.

like image 1
Jack Avatar answered Oct 17 '22 22:10

Jack


I had the same problem, but only on Android and not on UWP. Edit: I opened another version of the same project on Android. This built not ok. Reopened the problem project and did not get the error, so, problem solved. Lots of thanks for your solution.

like image 1
hwjSoftware Avatar answered Oct 17 '22 22:10

hwjSoftware


I started having this recently -- I use VS for Win connected to Mac to do the build for iOS project.

Let's face it, it's always wonky. But this got real bad today -- tried restarting VS, rebooting Mac, deleting bin/obj, etc.

Finally comment from OP made me think of something I didn't try -- shut down vs, delete the .vs folder, the bin/obj, and restart VS. I hate to delete the .vs cuz it resets stuff, including "reloading" my Android project, which I'm not currently working on.

Well, to early to say, but it worked once.

like image 1
bobwki Avatar answered Oct 17 '22 23:10

bobwki