Visual Studio 2010 Publish Command from msbuild Command line
Seems like there a bunch of confusion about how to produce the “Publish” behavior provided by Visual Studio 2010 from msbuild 4 command line. The question I keep seeing over and over again is: How do I publsih the output of a web application with web.config tranformations included. This should get the job done:
msbuild solution.sln
/p:Configuration=Release;DeployOnBuild=true;
DeployTarget=Package;_PackageTempDir=..\publish
How did you find the documentation on this topic? I’m looking for all the different possible values for /p:DeployTarget, /p:MsDeployPublishMethod, etc. and can’t find it andywhere. Where did you find the documentation to know that ‘Package’ was an option for /p:DeployTarget?
Thanks!
I was not able to find any official documentation on those arguments. Basically, I was able to put it together based on examples on stackoverflow and various blog posts. What are you trying to accomplish?
Works great for a solution with only one web application. My solution has ~6 class libraries and two WAPs. Any suggestions?
For the love of god thank you. This was the most annoying 12 hours getting ccnet configured in my life. This was my last problem. I will now go dance on top of my office building.
ok so I just want to build my .sln the publish it to a d:\temp_stage directory so I can look at it before I send it to QA.
do I set PackageTempDir=d:\temp_stage ? or must that be predefined
Yes. That should work. Give it a try.
Hmm sry its been a while getting an error–> MSB4057:The target “PackageTempDir=temp_stage” does not exist in the project..
But then it gives me the location of the file it is looking at my .csproj file. Your thoughts…. cmd below
d:\Program Files\Microsoft Visual Studio 10.0\VC>msbuild “D:\StarTeam\Falcon Dia
lysis\WebSites2010\Davita.FalconDialysis.sln” /p:Configuration=release;DeployOnB
uild=true;DeployTarget=PackageTempDir=D:\temp_stage
I got it working however, I have an easier question: Can use msbuild 3.5 to compile a dotnet 4.0 project? Thanks for all your help
No. I do not believe so. However, you can use msbuild 4 to target other versions of the .net framework.
If you need to “Publish” specific project from solution use this:
The key is to specify Targets here.
@Dave
Great!!! it is working like a charm… I spent some hours trying to find so nice and simple solution.
@Alexey
This post seems to be missing what we are supposed to use…where exactly do we specify the targets?
Hi. I try to do this, but I have several projects on my solution and that deploy just the last one. How can I specific that is to deploy all projects on my solution? Thanks for help
I suspect this would work great if I had a target in my project that fits with the ‘DeployTarget=Package’specified in the command line.
Could you please explain what the target does or give us a link to some documentation.
Thank you!
If you are going for most excellent contents like myself, only visit this site every day for
the reason that it gives feature contents, thanks
girl chat…
“[…]Christopher Patterson » Visual Studio 2010 Publish Command from msbuild Command line[…]”…
Representing that repair work services will be completed by a particular day in orrder tto induce the sale, then failing to have
the repair service solutions finished byy that day.
This page truly has all the information I wanted concerning this subject
and didn’t know who to ask.
Chiropractors In Santa Monica…
Christopher Patterson » Visual Studio 2010 Publish Command from msbuild Command line…
[…] http://pattersoncprod.wpengine.com/index.php/2010/07/15/visual-studio-2010-publish-command-from-msbuild-comm… […]
Quality articles or reviews is the crucial to
attract the viewers to visit the web site, that’s
what this site is providing.
dig this (Josh)
http://luchorosarigasino.blogspot.com
I do not know if it’s just me or if perhaps everyone else encountering issues with your site.
It seems like some of the text on your posts are running off the screen. Can someone
else please comment and let me know if this is happening to them as well?
This might be a issue with my internet browser because I’ve had this happen before.
Kudos