Why doesn't Visual Studio move some files in the publication?

When I try to publish my project, Visual Studio does not move some files to the publishing destination folder. I currently have this problem with .json files. I am using Visual Studio 2010 and MVC4.

Is there any configuration about which files or mime types should be published and transferred to the destination folder?

+4
source share
2 answers

If you want Visual Studio to move the files to the target publication folder, right-click on the file in the solution explorer and select properties, and then set the "Create action for content".

+9
source

You can set the Copy to file output directory property 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 .

+1
source

Source: https://habr.com/ru/post/1445464/


All Articles