Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VisualStudio 2012 & MVC4: How to deploy individual files/folders to filesystem?

I'm building a rather complex web application for data visualization with ASP.NET MVC4 in VisualStudio 2012 Professional. For technical reasons (involving realtime server-side messaging etc.) I have to deploy the web app via filesystem to our production server, so I can't use the development server in most cases.

As the project grows and contains more and more scripts, deploying almost takes a minute to complete, even on 1000BASE-T ethernet, which is very annoying. It would be absolutely sufficient in most cases to "update" only specific files or folders from within my project, because most files will usually never change (JQuery and other frameworks for example).

According to this post, it should be possible to publish individual files since Visual Studio 2012.2, but it does not work for me, the described options in the context menu do not exist.

This is the exact version of my VS:

Microsoft Visual Studio Professional 2012
Version 11.0.60315.01 Update 2
Microsoft .NET Framework
Version 4.5.50709

Has anyone faced this issue before? It'd be great to resolve this problem.

like image 950
Rob Avatar asked Jun 20 '13 09:06

Rob


2 Answers

For some reasons this feature described in the blog post, you mentioned, works only for Publish method "Web Deploy". I use this feature in my current MVC application and I noticed that if I switch to "File system" the described options in the context menu disappear.

like image 129
Andreas Avatar answered Nov 14 '22 21:11

Andreas


Further down the comments on the link you gave (http://www.west-wind.com/weblog/posts/2013/May/10/Publish-Individual-Files-to-your-Server-in-Visual-Studio-20122#127707) there is a note that you must have configured and saved your publish settings before the option will be present.

I can verify that a project I have never published does not have the option to publish individual files. One that I have published does have that option.

like image 40
Kate Paulk Avatar answered Nov 14 '22 22:11

Kate Paulk