I have a project that creates a couple of files when it is built. A second project in my solution has the first project as a project reference. How can I tell Visual Studio that it should copy these files into the output directory of the second project, because the referenced project depends on them?
Output directory of my first project:
Foo.exe
GeneratedFile1
GeneratedFile2
Output directory of my second project:
Bar.exe
Foo.exe
Should contain GeneratedFile1 and 2, but does not
CodePudding user response:
Right click the file in your Solution Explorer and select Properties. Within the dialog set
Build Action to Content
Copy to output directory to Copy if newer.