Everytime I build my solution, I get this error message:
Warning
3
Could not resolve this reference. Could not locate the assembly "StandardClassLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
StandardClassLibrary
So my application has a number of projects of which StandardClassLibrary
is one. The above message is a warning and as far as I can tell it does NOT have an impact on my solution.
But I would rather it not be there, just in case...
In summary if you get the "Could not load file or assembly error", this means that either your projects or their references were built with a reference to a specific version of an assembly which is missing from your bin directory or GAC.
You most likely get this message when the project points to an old location of the assembly where it no longer exists. Since you were able to build it once, the assembly has already been copied into your bin\Debug
/ bin\Release
folders so your project can still find a copy.
If you open the references node of the project in your solution explorer, there should be a yellow icon next to the reference. Remove the reference and add it again from the correct location.
If you want to know the location it was referenced from, you'd have to open the .csproj file in a text editor and look for the HintPath
for that assembly - the IDE for some reason does not show this information.
If anyone face this issue with some nuget packages, you can fix that by reinstalling the packages using the Package Manager Console:
Update-Package -reinstall
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With