Im learning Xamarin, when I try to create a project and build it, it gives me this error:
The "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be loaded
from the assembly ,
C:\Users\XXXX.nuget\packages\xamarin.forms\3.0.0.482510\build\netstandard2.0\Xamarin.Forms.Build.Tasks.dll.
Could not load file or assembly 'netstandard, Version=2.0.0.0,
Culture=neutral
I really dont know how to solve it. I installed Visual Studio with Xamarin found at this link
This is the cause:
Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral
Starting with Xamarin-Forms 3, XF has moved to .Net Standard 2.0, so you need to create a library against .net standard 2.0.
Thanks for all the suggestions. I just updated Windows 10 and it worked. I had and old Windows build so I guess it was related to my Windows being outdated.
Related
I've tried to build my App in Visual Studio / Xamarin. Android is working fine. I get the error for IOS, that the Java.Interop assembly could not be find. I read that it could be the Mono.Android Assembly. But when I remove it from my c# main project the Android project can't be build. Any suggestions what I can try to do that both systems can be build correctly?
I'm using Visual Studio Enterprise 2019 with newest Xamarin.
Cannot find the assembly 'Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' referenced from '/Users/[user]/Library/Caches/Xamarin/mtbs/builds/[myApp].iOS/6f60bd3b7d1dca37df26b69d9b9f708b/bin/iPhoneSimulator/Debug/Mono.Android.dll'.
Could not link assemblies. Reason: Error while processing references of '[myApp].iOS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
Thanks!
You must have a reference to Mono.Android within your Forms / iOS project, that's why when trying to build, will try to reference java.interop. Check your solution, if there is not reference to Android in iOS project or PCL / Forms.
Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Microsoft.Practices.Unity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f'. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'Microsoft.Practices.Unity.dll'
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference reference, Mono.Cecil.ReaderParameters parameters)
Can you please suggest for solutions
Your error message tells you everything you need to know: Microsoft.Practices.Unity, Version=4.0.0.0. You have a reference to v4.0 of Unity. Prism 7 references v5.0. You need to check your dependencies as somewhere you have a reference to the old package.
Also note that due to some changes that were made in the way that Unity ships, Prism has also made a change from referencing the Unity package to the Unity.Container package as of Prism 7.1.
MSB4062 The "Xamarin.Forms.Build.Tasks.XamlGTask" task could not be loaded from the assembly C:\Users\Admin.nuget\packages\xamarin.forms\3.0.0.482510\build\netstandard2.0\Xamarin.Forms.Build.Tasks.dll. Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. Confirm that the 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.
Is there any solution to get rid of this error
Clean your project,
Close the project,
Delete files in prefetch, temp and %temp% ,
Reopen the project ,
Rebuild the project,
If above step does not solve the problem then ensure if the NuGet package of xamarin forms installed for all the projects is of the same version (.net standard, Android and iOS).
Finally got a solution. After downgrading the Xamarin.Forms from version 3.0.0.482510 to version 2.5.1.527436 in all the projects, it compiled without errors.
In a Xamarin.Forms project I am getting an error on Windows 8.1 and UWP:
Could not load file or assembly 'FSharp.Core, Version=3.259.3.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
The actual version of F# used throughout the solution is 3.7.4.0:
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
<TargetProfile>netcore</TargetProfile>
<TargetFSharpCoreVersion>3.7.4.0</TargetFSharpCoreVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
There is an F# PCL project and C# platform-specific projects. The error occurs only when using F# libraries from Nuget in the PCL. These packages tend to use:
<TargetFSharpCoreVersion>3.259.3.1</TargetFSharpCoreVersion>
I have tried the following, but they do not change the error:
Putting an app.config file with a binding redirect to 3.7.4.0 in the F# project and/or the build directory
Installing the FSharp.Core Nuget package into all projects
Very grateful for any help.
Edit: in the original question there was an incompatibility between the profile (111) and the intended TargetFSharpCoreVersion (3.7.4.0) which was causing additional issues.
Here is our question: How can recompile Google drive api sdk in dotnet?
=> We didn't find the source code.
=> In the binary package, there a single source file not shipped with a project and we don't know what to do with it.
Reason of the question:
In dotnet, we're unable to use the latest Google Drive api dll downloaded from Google: Google.Apis.Drive.v2
We are getting compilation errors like:
Warning 10
The primary reference "Google.Apis.Drive.v2" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "Google.Apis.Drive.v2" or retarget your application to a framework version which contains "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Cause:
This is because we are in Visual Studio 2010 with dotnet framework 4.0.
Apparently Google.Apis.Drive.v2 is compiled with dependencies to framework 4.5.
We cannot upgrade our project to Dotnet framework 4.5 because we have only Visual Studio 2010 and it would take months of testing upgrading to visual studio 2012.
Troubleshooting
We have tried to use Binding redirection in app.config files but it's not working with Class library projects that reference assemblies that need redirection (here Google.Apis.Drive.v2).
For information, binding redirection was working fine if we changed the project to console application but failed when we switched back to class library.
#Google support:
- Where do we download the source code of Google Drive api dll and how do we build it?
- Do you plan to ship a library for dotnet 4.0 because forcing 4.5 will block a lot of companies?
I finally found the source code for older versions (that compiled with .NET 3.5) at: http://code.google.com/p/google-api-dotnet-client/source/browse/Services/?repo=samples&name=1.3.0-beta (Google Drive in particular - it doesn't seem to exist in the main set).
I'm having trouble interacting with the source repository with Mercurial, but I was able to directly download the CS file and compile it in my own project. I'll edit if I learn more.
You can checkout the code from https://code.google.com/p/google-api-dotnet-client/source/browse/