Reference a Core Class Library in a Core Web Application


#1

Hi!

I’ve just started developing with .NET Core and I’ve run into a problem I can’t figure out.
I have a Core Class Library which now only contains one custom Tag Helper. I’ve added a reference to the project’s assembly in my Core Web Application using Visual Studio 2017.

But when I run the Web Application I get this error: “Cannot resolve TagHelper containing assembly ‘LC_PUBLIC_CORE’. Error: Could not load file or assembly ‘LC_PUBLIC_CORE, Culture=neutral, PublicKeyToken=null’. The system cannot find the file specified.

The dll is in the bin folder, so I don’t know why it says it can’t find it. Do I need to add some other kind of reference?


#2

Ended up creating a new Solution and added the two projects. Added a project reference to LC_PUBLIC_CORE in the web application. It works, but I cant figure out why it doesn’t work when adding a regular reference.


.NET Foundation Website | Blog | Projects | Code of Conduct