build error 'Cannot resolve dependency to assembly ' - c#

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

Related

.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

How to resolve assembly dependency of system.web in visual studio 2017?

I have a WPF application source code when I am trying to open it in visual studio 2017 then it's giving error like
Unknown build error, 'Cannot resolve dependency to assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 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.'
I have search for related links but it's not resolve issue. Please can you help me to resolve this issue ?
Link which I get for resolve the issue is Getting an error Cannot resolve dependency to assembly System.Web
First of all check .chproj file of directory and remove system reference. And after that you should add reference manually System and system.web which required for your application. Error clearly indicating for dependency to assembly so please check and add required assembly from reference.

WPFToolkit.Aero2 failed to load

I get this error when debugging:
Managed Debugging Assistant 'BindingFailure' : 'The assembly with display name 'WPFToolkit.Aero2' failed to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'WPFToolkit.Aero2, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.'
I tried uninstall the Extended WPF Toolkit nuget (3.3.0) and install again. didn't solve.
What am I missing ?
I am using VS Enterprise 2017 version 15.5.7, .NET 4.7.1.
The exception is when I debug Managed debugging assistant on the upper
line of my Xaml.
My references are:
just had the same issue, while using the WPFToolkit.Extended (standalone, old version)
fixed it by removing the reference I had, and installing the nuget you refer to.
my current references look like this:
Note, that I don't reference "WPFToolkit", while you - do.
I would say, try removing the "WPFToolkit" reference, see if it helps.

Missing package System.Numerics.Complex in Xamarin Studio

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.

No way to resolve conflict between "XYZ" and XYZ"

We just did a merge(TFS) between two branches. But now when I compile, I've this error:
No way to resolve conflict between
"AA.BB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
and
"AA.BB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bfd296a93930d932".
Choosing "AA.BB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
"AA.BB" is one of our project, I've checked that we only reference it as a project. And we have only project named like this.
Does someone knows why this error is happening? And where this PublicKeyToken error can come from?
What I already tried:
Remove all reference to this project and make again the references
Search if one of those project was having a copyLocal = true(not the case) or referencing directly a DLL(not the case)
Note that:
The build is considered as succeed but when I launch the application I got errors(basically an error saying that this dll doesn't match the manifest)
If I got in the classes that uses this, I've no errors
I finally found the issue, I post it since maybe it can help someone in the future.
The issue was that before the Merge, there were some project which were having a different output directory.
So, when doing the rebuild, some project were finding multiple reference of the same project in different directory.
The solution is quite simple: Delete manually once the output directory and you're good :)

Categories

Resources