Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have developed an ASP.NET MVC 4 website using C# running on my local machine, and I want to publish it to our company's web server (as an aside, how many developers truly understand MVC?). We don't use Azure, code-first or any of the other techniques which every article on the subject seems to assume; instead we have a database-first entity model. Both the test and the live website must link to the same SQL Server database (we don't have a separate test database, which I'm sure will make people shudder, but it works for us).

What I want to be able to do is to publish the website as a final release, so we get minified CSS and JavaScript and only the files we need. I've looked at the Visual Studio publish option, and understand that to get this to work will mean installing Web Deployment Agent Service on the server.

Previously with classic ASP.NET webforms sites we've just copied changed files across on a as-needed basis, and this technique has worked well (I'm not keen on wizards).

Given all of the above, can anyone recommend a strategy, and advise on how to execute it? I'm having real problems finding help on Google.

Many thanks in advance!

share|improve this question
    
Anyone want to tell me why they marked down this question? –  Andy Brown Aug 2 '14 at 11:23

1 Answer 1

There are multiple publish options; to get what you're used to:

  • Choose Custom.
  • Choose the File System option.
  • Change the Configuration (the publish mode) to Release. This will run any transformations in your Web.config file and remove the "debug=true" value from the <compilation> node.

I also tend to check the "Delete existing files" and "Exclude files in App_Data" options. Use an external FTP client as needed once the publish has finished.

share|improve this answer
    
Thanks for this! –  Andy Brown Aug 2 '14 at 11:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.