0

I want to tidy up my solution and came up with the following structure

  • Project 1: MainApp (just the app, references Controls)
  • Project 2: Controls (contains controls and references ViewModel)
  • Project 3: ViewModel (contains the viewmodel references Model)
  • Project 4: Model (contains the model)

When I run the project now, I get a FileNotFound error for the ViewModel.dll. If I check the bin folder of the MainApp, I see a the Controls.dll, but not the ViewModel.dll.

How do I configure the project, so that all dll's are copied to the bin folder of the MainApp?

Edit: I am using Visual Studio 2015 and not MS Build.

Mister 832
  • 1,177
  • 1
  • 15
  • 34
  • Possible duplicate of [Msbuild doesn't copy references (dlls) if using project dependencies in solution](http://stackoverflow.com/questions/1132243/msbuild-doesnt-copy-references-dlls-if-using-project-dependencies-in-solution) – Nikita Dec 16 '16 at 17:07
  • Open the References of the Controls project, right click on the reference to ViewModel and select Properties. Check if Copy Local = true (should be the default) – Steve Dec 16 '16 at 17:09
  • Copy Local is set to true. And the Controls.dll is copied to the output folder. What is missing is the ViewModel.dll, which is not referenced in the MainApp, but only in the Controls project. In the output directory of the Controls project, i can find the Viewmodel.dll. – Mister 832 Dec 16 '16 at 17:11

0 Answers0