Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strong-name Xamarin.Build.Download #1381

Open
jonpryor opened this issue Jun 7, 2022 · 1 comment
Open

Strong-name Xamarin.Build.Download #1381

jonpryor opened this issue Jun 7, 2022 · 1 comment

Comments

@jonpryor
Copy link
Member

jonpryor commented Jun 7, 2022

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.

@carrilloan
Copy link

Is there any workaround? in my case mix version 0.10.0 with 0.11.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants