Strong-name Xamarin.Build.Download
jonpryor opened this issue · comments
Context: dotnet/android@2d81740
Context: https://discord.com/channels/732297728826277939/732297837953679412/983404599920705557
An occasionally reported issue is an MSB4064 error when using Xamarin.Build.Download:
C:\Users\allan.nuget\packages\xamarin.build.download\0.11.0\buildTransitive\Xamarin.Build.Download.targets(60,4): error MSB4064: The "AndroidFixManifests" parameter is not supported by the "XamarinDownloadArchives" task loaded from assembly: Xamarin.Build.Download, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null from the path: C:\Users\allan.nuget\packages\xamarin.build.download\0.11.2\buildTransitive\Xamarin.Build.Download.dll. Verify that the parameter exists on the task, the <UsingTask> points to the correct assembly, and it is a settable public instance property.
This error probably happens because there is more than one Xamarin.Build.Download.dll
running around, and because Xamarin.Build.Download.dll
is not strong-named, only one can be loaded into the AppDomain at a time. Consequently, you have very little control over which version is used, and if the wrong version is used, things break.
Xamarin.Android.Build.Tasks.dll
had a very similar issue, which was fixed by strong-naming Xamarin.Android.Build.Tasks.dll
and all of its dependencies: dotnet/android@2d81740
I suspect that Xamarin.Build.Download.dll
should likewise be strong-named, in order to allow multiple different versions to be loaded into the same AppDomain, which should avoid these MSB4064 errors.
Is there any workaround? in my case mix version 0.10.0 with 0.11.4