Why Visual Studio doesn't move some files in publish?

╄→尐↘猪︶ㄣ 提交于 2019-12-10 13:27:53

问题


When I try to publish my project, Visual Studio doesn't move some files to target publish folder. Currently I have this problem with .json files. I'm using Visual Studio 2010 and MVC4.

Is there any configuration about which files or mime-types should be published and moved to target folder?


回答1:


When you want to Visual Studio move files to target publish folder click right on the file in solution explorer and select properties then set Build Action to Content.




回答2:


You can set the Copy to Output Directory property of a file in Visual Studio. Click the file name, press F4 to open the properties, and set Copy to Output Directory to Copy always or Copy if newer.



来源:https://stackoverflow.com/questions/13340687/why-visual-studio-doesnt-move-some-files-in-publish

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!