Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Annotations task VerifyVersionsTask fails with dotnet build #236

Open
pjcollins opened this issue Jan 29, 2020 · 1 comment
Open

Annotations task VerifyVersionsTask fails with dotnet build #236

pjcollins opened this issue Jan 29, 2020 · 1 comment

Comments

@pjcollins
Copy link
Member

In our experiments with creating a Xamarin.Android MSBuild project SDK and testing our compatibility with dotnet build, we've ran into the following error in _VerifyXamarinAndroidSupportVersions:

Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

C:\Microsoft\Xamarin\NuGet\xamarin.android.support.annotations\28.0.0.3\build\monoandroid90\Xamarin.Android.Support.Annotations.targets(20,3): error MSB4062: The "Xamarin.Android.Support.BuildTasks.VerifyVersionsTask" task could not be loaded from the assembly C:\Microsoft\Xamarin\NuGet\xamarin.android.support.annotations\28.0.0.3\build\monoandroid90\Xamarin.Android.Support.BuildTasks.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

If we choose to address this I believe we'll need to switch the MSBuild references in this project over to NuGets, or do something similar to what xamarin-android is doing.

@pjcollins pjcollins changed the title Annotations task _VerifyXamarinAndroidSupportVersions is fails when building an Android project with dotnet build Annotations task _VerifyXamarinAndroidSupportVersions fails with dotnet build Jan 29, 2020
@pjcollins pjcollins changed the title Annotations task _VerifyXamarinAndroidSupportVersions fails with dotnet build Annotations task VerifyVersionsTask fails with dotnet build Jan 29, 2020
@l3ender
Copy link

l3ender commented May 21, 2023

We are facing this issue as well. Is there a workaround? Thanks!

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

No branches or pull requests

2 participants