I tried to migrate a MvvmCross project to Unified API and got stuck at MvvmCross libraries, as soon as I add them, it fails to compile.
To recreate the issue I simply created a new Unified API empty project and added MvvmCross 3.5 NuGet package. Tried to compile and got these errors:
Setup.cs(8,23): error CS0012: The type 'System.Object' is defined in an assembly that is not referenced. Consider adding a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
DebugTrace.cs(9,27): error CS0012: The type 'System.Enum' is defined in an assembly that is not referenced. Consider adding a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
I'm using Xamarin Studio 5.8 for Mac with Xamarin.iOS 8.8.
Shouldn't this work out-of-the-box? Am I missing something?
EDIT: Created a new solution from scratch and it works as expected, so I guess it should be something related to the solution file.
It seems that deleting bin and obj folders and a Xamarin Studio restart did the trick. Now everything is worked as expected.
Related
I am using .net Framework 4.5.2. I am running MVC application. As i got new laptop I am getting the issue when running the MVC Application.
ERROR:
The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
Microsoft Studio Professional 2017
Version : 15.9.12
In other teammates VS version is 15.8.1. Where it is running without any issue.
I have also installed MVC 4 and Missing plugins. Still, I am getting this issue.
please suggest to me what I need to do.
Thanks!
Deleting Bin and Obj folders worked for me.
I am struggling to find a reason behind this error in my code:
ApplicationServiceTests\Test.cs(29, 13): error CS0012: The
type 'ValueType' is defined in an assembly that is not referenced. You
must add a reference to assembly 'netstandard, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
The code line is:
repo.GetCoveredCards(Arg.Is(cifCode)).Returns(Task.FromResult(new GetCustomerCCPlusResponse()
{
CreditCardPlus = new[] { card1, card2 }
}));
Tools, framework and Package
.net framework 4.6.1
Visual Studio 2015 using MSBuild 14.
NSubstitute 3.1.0
It seems like when I use NSubstitute version 1.10.0 and it has worked really well.
Now the question is why am I getting this error with the latest version of NSubstitute?
I had the same issue after updating Visual studio.
Delete the bin and obj folders from the UT project folder and rebuild the project. That fixed it for me.
Since I upgraded my Xamarin.Forms project to ServiceStack 5, I receive this message:
CS0012 The type "IReturn<>" is defined in an assembly that is not
referenced. You must add a reference to assembly
'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral,
PublicKeyToken=02c12cbda47e6587'.
References are already added. I have no idea how to fix this. Is anyone experiencing the same issue?
Edit: I use Xamarin Forms as a Shared Project, if that matters.
I already reinstalled v4.5.14, but the error still comes up.
Hello I am working on a Xamarin cross platform application using PCL for code sharing, and when I try to build the solution, I have the following error message:
Error CS0012 The type 'Attribute' is defined in an assembly that is
not referenced. You must add a reference to assembly 'System.Runtime,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
I am targeting version 4.5 of the .NET framework. This error occured when I build, on a file generated in the obj folder.
I tried changing the references of the project but the only reference is "NET" (version 4.0.0) and I can't delete it nor add any other system reference so I don't know what to do.
I updated Visual Studio Community 2015 to Update 3 and since then, all "await" statements in UWP apps are throwing errors.
The errors I receive are -
The type 'IAsyncAction' is defined in an assembly that is not
referenced. You must add a reference to assembly 'Windows,
Version=255.255.255.255, Culture=neutral, PublicKeyToken=null,
The type 'IAsyncActionWithProgress<>' is defined in an assembly that
is not referenced. You must add a reference to assembly 'Windows,
Version=255.255.255.255, Culture=neutral, PublicKeyToken=null,
The type 'IAsyncOperation<>' is defined in an assembly that is not
referenced. You must add a reference to assembly 'Windows,
Version=255.255.255.255, Culture=neutral, PublicKeyToken=null,
The type 'IAsyncOperationWithProgress<>' is defined in an assembly
that is not referenced. You must add a reference to assembly 'Windows,
Version=255.255.255.255, Culture=neutral, PublicKeyToken=null,
For now, this is all that I have tried to - Clean install Visual Studio Community 2015 Update 3 along with UWP Tools 1.4, SDK 10586 and SDK 10240; manually reinstalling each SDK.
I've had this error in the past too when I upgraded from VS version 1 to 2 I think, seem like this error was caused by me trying to upgrade instead of doing a clean install, I fixed it by removing VS and anything related to it from the control panel, then did a clean install and it was fixed.
I uninstalled both SDKs manually and reinstalled them. The problem seems to be fixed lol.