24

Is there any way to build deployment package for a Web Application using Visual Studio 2010 CommandLine ?

1
  • 6
    Please mark hivie7510 with answer. Commented Dec 18, 2012 at 16:09

1 Answer 1

26

I think this has what you are looking for

MSBuild "MyProjectName.csproj" /T:Package /P:Configuration=Staging;PackageLocation="D:\Vishal\Package.zip"

I got this from this site: http://vishaljoshi.blogspot.com/2009/02/web-packaging-creating-web-packages.html

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

2 Comments

If you get the OutputPath empty error, add a /P:Platform=AnyCPU argument (no spaces in AnyCPU).
Also, the PackageLocation will be cleaned first, so watch for deletion of important files. I spat my coffee across the room when I saw it cleaning my main code folder!

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.