Reputation: 6262
Project type: .net Core/Visual Studio 2017
I have 3 projects in my solution
In Core project I have added reference of Data (Right click, add reference and added reference for Data.dll from path of \bin\Debug\netcoreapp2.0\Data.dll which was in Data project)
In Service project I have added reference of Core (Right click, add reference and added reference for Core.dll from path of \bin\Debug\netcoreapp2.0\Core.dll which was in Core project)
For both of these DLL's I have set "Copy Local" to true.
Now when I build these individual project in the sequence of Data, Core and then service. Everything is fine.
But when I right click my solution folder and click clean solution and then rebuild the entire solution. I get errors on Core & Service stating type of namespace not found.
I even have added them as dependencies in my solution but still receive error. Not sure where I am going wrong.
Thanks
Upvotes: 0
Views: 252
Reputation: 36
It sounds like you have added an explicit reference to Core.dll instead of a project reference to the Core project. As a result, Visual Studio (and MSBuild) do not know that Core must be built before Service. That's why building Core before Service works, but building Service before Core does not.
If you delete your reference to the dll and re-add the reference as a project reference, your problem should be resolved.
Upvotes: 2