问题
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