Last post Apr 27, 2017 09:31 PM by Dmitry Sikorsky
Apr 27, 2017 08:12 PM|proskilly|LINK
I have added a reference to a class library project in the same project as my asp.net core web application. It shows up under Dependencies/Projects
However when I try to refer to any namespace/class inside this referenced project from a asp.net core controller action it just says "the type or namespace name XXX could not be found..."
The refernced DLL/project is full .net framework, not core.
Apr 27, 2017 09:31 PM|Dmitry Sikorsky|LINK
So, I have checked and I have the same issue. If I try to use the type defined in the referenced assembly I will get the exception.
UPD 2: So, to be able to reference a dll file you have to put ALL the dependencies that that dll needs (and all their dependencies too).
If you reference a lib as a nuget package .net will restore all the dependencies for you, but not in the case of dll.