Xamrain form build task reference error in visual studio 2017 - c#

I am using visual studio 2017 and when I install xamrain from build 3.0 then I get the error bellow running application. How to resolve this problem?
Severity Code Description Project File Line Suppression State
Error The "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be
loaded from the assembly
D:\Practics\AndroidApp\packages\Xamarin.Forms.3.0.0.561731\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. AndroidApp.Android D:\Practics\AndroidApp\packages\Xamarin.Forms.3.0.0.561731\build\netstandard2.0\Xamarin.Forms.targets 36
Severity Code Description Project File Line Suppression State Error The "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be
loaded from the assembly
D:\Practics\AndroidApp\packages\Xamarin.Forms.3.0.0.561731\build\netstandard1.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. AndroidApp D:\Practics\AndroidApp\packages\Xamarin.Forms.3.0.0.561731\build\netstandard1.0\Xamarin.Forms.targets 36

Well, This is xamarin-forms v 3.0 known issue with visual studio 2017. I faced same issue on last week (ref : https://bugzilla.xamarin.com/show_bug.cgi?id=60293).
Fix : Install .NET framework 4.7.1. from Microsoft(https://www.microsoft.com/en-us/download/details.aspx?id=56116) and then restart your system.

Related

Warning CS8032 Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.3.0.0

Getting the following warning. Projects loads and runs ok but I don't know how to get rid of this warning.
Visual studio 2019, WebForms.
Warning CS8032 An instance of analyzer Microsoft.CodeAnalysis.Analyzers.MetaAnalyzers.EnableConcurrentExecutionAnalyzer cannot be created from
C:\Web Directory\VenueManagementSystem\VMSstartup\packages\Microsoft.CodeAnalysis.Analyzers.3.3.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll
: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
The system cannot find the file specified.. VMSstartup C:\Web Directory\VenueManagementSystem\VMSstartup\CSC 1 Active
I think you experience the same issue with this one on github
Check your package.config file for an instance of Microsoft.Net.Compilers and try to upgrade to the latest version (this should do the trick).
In any case, I don't expect this to affect your application whatsoever. This is just related to static code analysis for your project and has nothing to do with your runtime execution.

.NETCore 3.1 - Error MC1000 Unknown build error, 'Could not find assembly 'System.Web, Version=4.0.0.0

Using Visual Studio 16.6, migrating WPF app to target .netcore3.1(.300). Cannot compile with error below:
Error MC1000 Unknown build error, 'Could not find assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly.' MyApp C:\Program Files\dotnet\sdk\3.1.300\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.WinFX.targets 225
I don't seem to have any need or reference for System.Web
I see similar things here but am on current versions:
https://github.com/dotnet/wpf/issues/2648
Any ideas?
There seemed to be an issue with the structure of the project file. I don't reference System.Web but a third party DevExpress component does.
When you target .netcoreapp31 AND net472, the Nuget packages do not seem to get pointed to the target frameworks correctly. The project file needed to be manually restructured to point them to the correct frameworks.
Details here:
Issue on github dotnet/wpf

Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UTFResources

After moving the project for another team project i start to get the following error when, running a unit test, an assert fails:
"Could not load file or assembly
'Microsoft.VisualStudio.QualityTools.UTFResources, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
System.IO.FileNotFoundException
There is no failed references for the test project
Solved by removing :
Microsoft.VisualStudio.QualityTools.UnitTestFramework
'Microsoft.VisualStudio.QualityTools.UnitTestFramework.Extension'
and adding `Microsoft.VisualStudio.QualityTools.UnitTestFramework Version=10.1.0.0', the last version available on my instalation.
Extension dll was not even available to add.

Could not load file or assembly 'Microsoft.SqlServer.Types, Version=12.0.0.0, Culture=neutral, PublicKeyToken=myKey' or one of its dependencies.

After running an ASP.NET C# application with SQL SERVER version 2012, I get the following error message:
An error occurred during local report processing.
The definition of the report 'C:\inetpub\wwwroot\psla\Reports\PD Listing Report - Per ED.rdlc' is invalid.
An unexpected error occurred in Report Processing.
Could not load file or assembly 'Microsoft.SqlServer.Types, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
What could be the cause? I have tried searching the net and there are references to version=11.0.0.0 but there are no references to version=12.0.0.0 for 'Microsoft.SqlServer.Types'. Reviewing the reference Manager for visual studio 2015, I was only able to find up to version=11.0.0.0.
In your Package Manager download the 12 version from Nuget
https://www.nuget.org/packages/Microsoft.SqlServer.Types/
Also see that entry for this is backward compatible in web.config
In your references folder right click and set copy local = true
It appears that some library in your project is referencing Microsoft.SqlServer.Types, Version=12.0.0.0 but .NET runtime cannot find it at execution.
On the web server, where the application is running, make sure that there exists a following directory: C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Types\12.0.0.0__89845dcd8080cc91\
Also make sure that this directory has the file Microsoft.SqlServer.Types.dll of version 12 (12.0.2000.8). Different versions of the file can be downloaded from https://www.nuget.org/packages/Microsoft.SqlServer.Types/

Google Api - System.IO.FileNotFoundException : Could not load file or assembly 'System.Net.Http.Primitives'

I'm getting the following exception when trying to use the Google Auth API:
System.IO.FileNotFoundException : Could not load file or assembly 'System.Net.Http.Primitives, Version=4.2.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
----> System.IO.FileNotFoundException : Could not load file or assembly 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
The exception happens in Google.Api.Core.dll.
If I check the /Bin folder I can see Sytem.Net.Http.Primitives.dll in there and the version is 4.2.28.0.
I have tried updating the Microsoft HTTP Client Libraries NuGet package but that didn't help.
Is the problem something to do with a mismatch of .dll versions? If so how can I resolve that? Or is it something else entirely?
Double check if the assembly file is there in the bin folder and if its there, then try removing the reference and again add it to your project.
The version should be the same as expected. Also check on your web.config too for what it has about this particular assembly.
In your error code, I can see two different versions for the same file. Means probably, you are getting a clash between the existing assembly and the referenced assembly. Check you web.config for which version is referenced there and make sure you have the same version added to your project.
This link might help :
Could not find assembly System.Net.Http.Primitives

Categories

Resources