I wish to test the core class of a plugin by directly referencing the plugin project and instantiating the plugin class. When I create a test Console App project and add a p
For me, I ran into this issue when referencing a .NET Standard 2.0 class library in a .NET Framework 4.7.1 console application. Yes, the frameworks are different, but they are compatible (.NET Standard is supposed to jive with both .NET Core and .NET Framework.) I tried cleaning, rebuilding, removing and readding the project reference, etc... with no success. Finally, quitting Visual Studio and reopening resolved the issue.
For both of (or all of) the projects that you want to use together:
Right click on the project > Properties > Application > Target .NET framework
Make sure that both of (or all of) your projects are using the same .NET framework version.
In Asp.net core sometime it shows alert if you changes the project name space or name. To remove this kind of alerts you just Unload Project and load it again. If issue is still there means you it can not find your Assembly reference.
Thank you all for the help. Here is a breakdown of how I fixed my problem:
Right click on your project > Properties
Under Application change the target Framework. In my case ImageSharp was using .Net 4.6.1. You can find this in your packages.config.
Go to your project references. You'll notice SixLabors has a yellow triangle. You have to update the NuGet package.
Right click on References > Manage NuGet Packages.
Update SixLabors.
You might have slight code updates (see below) but this fixed my problem.
Convert ImageSharp.Image to ImageSharp.PixelFormats.Rgba32?
in VS 2017 Do a Clean then Build
Make sure all versions are same for each projects click each projects and see the version here Project > Properties > Application > Target .NET framework
a. Go to Tools > Nuget Package Manager > Package Manager Console Type Update-Package -Reinstall (if not working proceed to 2.b)
b. THIS IS CRITICAL BUT THE BIGGEST POSSIBILITY THAT WILL WORK. Remove < Target > Maybe with multiple lines < /Target > usually found at the bottom part of .csproj.
Save, load and build the solution.