Afshin Mehrabani
Afshin Mehrabani

Reputation: 34987

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

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?

Upvotes: 7

Views: 4569

Answers (2)

user1318951
user1318951

Reputation:

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.

Upvotes: 11

Dennis Traub
Dennis Traub

Reputation: 51664

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.

Upvotes: 1

Related Questions