Why does Xamarin.Android restore the entire solution after launch?

I am using Xamarin Studio with Xamarin.iOS and Xamarin.Android. There are two solutions in my workspace: one for android, the other for ios. The projects are almost the same. When I create a solution for ios, it restores only changed projects. He performs some additional operations that take very little time. So click "Build a second time" with virtually no time.

But when I create a solution for Android, it restores all projects regardless of changes in files, configuration, etc. If I click Build after a successful build, it restores it again and again. Worse, if I try to start a project just built, it will restore it! Also, if I run the project after launch (when you debug the program, this often happens), it restores it again. Since I have many projects, it takes a lot of time, plus compilation is very processor dependent, so speed improvement is difficult.

In general, the question is, is it possible not to rebuild the whole solution with each assembly? Maybe there is a configuration option that I am missing, or is something incorrectly configured?

I don’t know if the configuration of the projects is important for the question, so please tell me which part of the configuration of the solutions / projects can help.

Versions:

  Xamarin studio
 Version 4.0.9 (build 12)
 Xamarin.Android
 Version: 4.7.11 (Business Edition)

// I thought that separate compilation these days is mandatory in every serious compiler, so I assume that I did something wrong.

UPD: I installed the latest versions of Xamarin Studio and Xamarin.Android:

  Xamarin studio
 Version 4.0.12 (build 3)
 Xamarin.Android
 Version: 4.8.1 (Business Edition)

It takes 1 minute 58 seconds to restore the solution for Android. Every time I run the application.

+4
source share
3 answers

Honestly, this sounds like a bug in Xamarin Studio or the xbuild build tool, at least if you don't have any custom build steps (which probably isn't)? Could you submit a bug report at https://bugzilla.xamarin.com ? Thank you He really does not have to rebuild the project every time.

I'm really glad to hear that your iOS project is not rebuilding, though, since I am the developer of the iOS build code :-)

+1
source

I think the reason for the complete rebuild when you want to run is because the APK file is not generated with a simple restore. It is generated first when you need to deploy or launch a project.

+1
source

This is not a mistake, I have the same functions, and I wasted the time wasting waiting for each run in debug mode. I think that using Xamarin cost me 10 times more time than using any other problems related to the development of the environment due to such problems ... This is an unprofessional tool.

0
source

Source: https://habr.com/ru/post/1498804/


All Articles