I have a Visual Studio 2012 solution containing three projects. A simple dependency graph of the structure is:
- ConsoleUI
- SubProject
- Newtonsoft.Json.dll
- RestSharp.dll
- …
- …
- SubProject
The problem I have is when compiling ConsoleUI, RestSharp is not copied to output but Newtonsoft.Json is causing a runtime error in my application.
I have checked that Copy Local is set to true in the project properties of SubProject.
I have done a full Clean and Build to no avail.
Can anyone think of a solution without manually including the required assembly in ConsoleUI?
This sounds like a long-existing behavior in MSBuild. Which assemblies actually get copied locally when you build ConsoleUI is calculated based on:
The two ways to work around this are: