Possible Duplicate:
How do I publish a Asp.net web application using MSBuild?
How can I publish a web app using msbuild through the command line or insdie a batchfile??
You can pass /p:PublishUrl="newpath" to the msbuild command. You would also see this set in the csproj file which you can change.
A publish profile is just an MSBuild file. When you pass in PublishProfile and DeployOnBuild=true, then the publish profile is Imported into the build/publish process. It will supply the publish properties needed to perform the publish. Let's see how that works.
To publish from Visual Studio, do the following: Change the solution configuration from Debug to Release on the toolbar to build a Release (rather than a Debug) version of your app. Right-click on the project (not the solution) in Solution Explorer and select Publish. In the Publish tab, select Publish.
I wonder what exactly you're trying to do. Is it just xcopying your files over to the deployment server or does it also include setting up IIS?
MSBuild has built in tasks for Copy and Building, but does not include IIS tasks. For that I would recommend finding a tasks library like the MSBuild extension pack or the MSBuild community tasks.
http://www.codeplex.com/MSBuildExtensionPack/
http://msbuildtasks.tigris.org/
If this is a web application project all you need to to is build the sln/project and then copy the published web site files to wherever
If it is a web site then you can use the ASPNetCompiler task
<AspNetCompiler
Clean="true"
Debug="true"
VirtualPath="/"
PhysicalPath="$(BuildDir)\"
TargetPath="$(BuildDir)\Publish\"
Updateable="true"
FixedNames="true"
Force="true" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With