3

Got a quick question about deployment methods,

I am use to programming a site in Visual Studios using C# for ASP.net and then saving and building it, then copying over the entire contents of the folder for the Visual Studio project to the coordinating IIS folder that is hosting the site each time I make a change to the site and need to update it, but there has got to be a better more efficient way do this to deploy the web site or application from Visual Studios to update your site.

Does anyone have any advice on deployment techniques or any builtin tools in Visual Studios has for deployment of a programmed site. Any advice is helpful.

1
  • 1
    Look into project properties-Package/Publish web. Also, right-click on project-publish. Also, there is nothing wrong with it. This is how deployment is done on our test servers - we copy set of directories into configured virtual directories. You can have batch script to do it for you on project post-build events. There is no problem with your way Commented Feb 1, 2014 at 2:20

2 Answers 2

3

You can use MSBuild Community FTP Task. Another you can use XCOPY.

Sign up to request clarification or add additional context in comments.

Comments

1

you can look in to the Publish feature of Visual Studio. This will work if it's just a small site and just you working on it. If things get bigger and more complex, you may want to look it something else like CruiseControl.

5 Comments

Even if multiple people are working on a web application, Publish is still useful for publishing your changes to a local web site, and it's useful at the end of a Continuous Integration build to deploy the combined changes after a check in to source control.
I did say "may want to look" ;-) Depends on how complex the build becomes and what flexibility you need.
I have rarely seen a build so complex that MSBUILD can't build it, so not so complex you can't use "Publish" from Visual Studio. You do know that Publish doesn't just copy files around, right?
It pretty much does and if you have files that are not included in your project that are needed, these will not be copied. Also, if you are using separate configuration files for dev/qa/prod, this can also add to the complexit. Yes, Publish handles the app.config.prod or whatever, but ONLY Publish handles that. I also don't have access to our production database passwords and Publish won't swap in those values into the config files. So yes, MSBUILD should be able to build it, but that is what things like CruiseControl use to BUILD. When you're ready to push, you may need something beefier.
Web.config transforms handle changing connection strings, which are permitted to be encrypted, so they can be stored in the transform files. And if you need the transforms done at Build time, Slow Cheetah handles that. And you can arrange to have extra files included or particular files excluded using Publishing Profiles, and if you want to learn about these things, just ask on Stack Overflow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.