I have a .NET Core class library project ClassLibrary1 created in Visual Studio 2015. In this class library project, I added the NewFolder folder that will be used by any project that references ClassLibrary1 .
So for example, I have a project called ConsoleApplication1 that references ClassLibrary1 . Every time I build ConsoleApplication1 , NewFolder should be copied
FROM
PROJECT_PATH\ClassLibrary1\bin\Debug\net452\win7-x64\NewFolder
FROM
PROJECT_PATH\ConsoleApplication1\bin\Debug\net452\win7-x64\NewFolder
UPDATE:
I added the following to the project.json file of my project ClassLibrary1 .
"buildOptions: { "copyToOuput": "NewFolder" }"
It only copies the PROJECT_PATH\ClassLibrary1\bin\Debug\net452\win7-x64\NewFolder PROJECT_PATH\ConsoleApplication1\bin\Debug\net452\win7-x64\NewFolder , but not to PROJECT_PATH\ConsoleApplication1\bin\Debug\net452\win7-x64\NewFolder when creating ConsoleApplication1 .
I have no idea how this should be done in .NET Core projects, because this does not look like behavior for projects other than .NET Core.
UPDATE 2:
In projects other than .NET Core, I simply add a script to the command line of events after the ClassLibrary1 build and automatically copy everything to ClassLibrary1/bin/Debug , including files and folders, to ConsoleApplication1/bin/Debug .
xcopy "$(ProjectDir)NewFolder" "$(TargetDir)NewFolder" /E /Y
source share