I have a .NET Core console application and a .NET Core class library. Both are extremely simple, single class projects. Both are freshly built, with a fresh install of the latest .NET Core. Both target .NET Core 1.1.
This error occurs at runtime whenever I include a .NET Core class library in an application:
System.IO.FileNotFoundException: 'Could not load file or assembly 'NAME, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
Building either projects are fine, and Intellisense shows me the contents of the class library after including a using...
statement. With the reference and code written there are no issues at compile time.
I've set the Copy Local
to Yes
for the referenced assembly in my console application. The referenced DLL exists in the bin
folder of the console application during run time.
Here is the csproj
reference:
<Reference Include="NAME">
<HintPath>path\bin\Debug\netcoreapp1.1\NAME.dll</HintPath>
<Private>true</Private>
<SpecificVersion>false</SpecificVersion>
</Reference>
This only happens with .NET Core DLLs, I have absolutely no issues with .NET Framework 4.5.* and up.
Could anybody shed some light on this issue? Any SO/MSDN pages I've found regarding this have been specific problems like targeted the incorrect version of a DLL, which doesn't help.