Missing package System.Numerics.Complex in Xamarin Studio - c#

I want to run a project from here https://github.com/se-passau/SPLConqueror/tree/master/SPLConqueror
I opened it in Xamarin Studio (I’m running OS X El Capitan 10.11.6), but in the file FeatureSubsetSelection.cs line 1287 (System.Array ret = Array.CreateInstance(typeof(T), A.S.ToIntArray().Reverse().ToArray()); ) it gives me the error
Error CS0012: The type System.Numerics.Complex' is defined in an assembly that is not referenced. Consider adding a reference to assemblySystem.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' (CS0012)
where A.S.ToIntArray().Reverse().ToArray() is said to be the critical part.
I added the nuget package System.Numerics.Vectors (because there was no other package with System.Numerics), but the error is still there.
Does anyone have an idea how to fix it? Thanks in advance!

You need to add System.Numerics as a reference before you can use it.

Related

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

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.

NSubstitute -3.x 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard,

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.

Opening any Windows 10 UWP Project gives error for all "await" statements

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.

Unable to compile project with MvvmCross 3.5 and Unified API

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.

build error 'Cannot resolve dependency to assembly '

I'm amateur in c#, I learned basics and start programming, I try to download open source projects from svn of sf.net but in compile of most of them I faced with an error like this:
build error, 'Cannot resolve dependency to assembly '
and in continue of error it give a publicKeyToken and no line give me.
What is wrong? I just open project with Visual studio .net 2010 and try to debug. please help me.
Seems that you have some assembly reference which may not exists or may have wrong details.
You need to either correct the details in the web.config or you need to install assembly reference to your c drive
Cannot resolve dependency to assembly 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' because it has not been preloaded.
When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on >demand through the ReflectionOnlyAssemblyResolve event.
To resolve it you can just switch off in VisualStudio: Debug->Exceptions->System.IO

Categories

Resources