My project solution is currently having three projects:
- MyProject, which is my main startup project (using
.NET Framework 4.7
) - WPF, UI specfic, - MyProject.Core - class library (
.NET Standard 2.0
) - holding the models, and all of the 'behind the scenes' data - MyProject.Relational - class library (
.NET Standard 2.0
) - responsible for processing and saving the database specific informations
Project 1
(main) has set a reference to project 2
and 3
.
For the project 3
I have installed a NuGet
dependency of Microsoft.EntityFrameworkCore.Sqlite (2.0.3)
.
Now, when I finally want to make use of project 3
and call it's method, the following exception is being thrown:
System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.
This, of course is a missing DLL file - no entity framework DLL's are being copied to the app Debug
directory.
Why is that? Is this intended behaviour? Do I have to install the dependency of Microsoft.EntityFrameworkCore.Sqlite
for project 1
as well? Pretty pointless to me, referencing the same dependency to project that is making no use of it.
What have I tried:
- Cleaning up the project, removing bin/obj directories,
- Set project reference properties setting
copy local
toTrue
, - Solutions given in this question: Referenced DLL not being copied to referencing project
Using Visual Studio 2017.