开发者

Is there a command that includes files in a project of Visual Studio 2010?

开发者 https://www.devze.com 2023-03-28 15:53 出处:网络
I\'m developing a web project that consists from many other projects, so when I build my main project I need to copy some resource files to the folder of main project

I'm developing a web project that consists from many other projects, so when I build my main project I need to copy some resource files to the folder of main project and make all copied files as included in this project.

I'm using post event feature for doing this.

xcopy /E /Y  "SourcePath1" "$(ProjectDir)Scripts\"
xcopy /E /Y  "SourcePath2" "$(ProjectDir)Scripts\"
xcopy /E /Y  "SourcePath3" "$(Proj开发者_如何学PythonectDir)Scripts\"

this command copies my files, but these files are not included in the project. What command can I use for including copied files?

I need something like

include "pathtwherefilesare" 

Thanks!


There is a icon in the solution explorer to "show all files". Then you can include (right click) these files to your project.


you can copy once, and add copied files to project, then commands will replace old files with new ones

Hope this helps


If your project is a web application project (as opposed to web site project), try Add Existing Items, select the files, and select Add as Link from the Add button dropdown menu.

Edit the files' Build Action and Copy to Output Directory settings as required.

0

精彩评论

暂无评论...
验证码 换一张
取 消