Chris
Chris

Reputation: 1203

Difference between msbuild publish and package

What are the differences between msbuild /t:publish and msbuild/t:package when preparing a web app for deployment?

I know both of them prepare the application for deployment by gathering all necessary files and dumping them in a directory and package does this plus zips the files up. Are these the only differences? Are there any differences in how the files are prepared for deployment?

Do these function the same as "Publish" and "Build deployment package" in Visual studio 2010?

Thanks

Upvotes: 0

Views: 1504

Answers (1)

Eric J.
Eric J.

Reputation: 150108

The package switch will create a deployable package that you can manually copy to your server and run, whereas publish will attempt to upload the package to your web server and execute it automatically.

With package, you will find a number of files in

[ProjectDir]\obj[BuildType]\Package

You need to copy across the .cmd, .SetParameters.xml, and the .zip files if you want to manually run it on the target server. You'll need to run the .cmd as Administrator.

Upvotes: 1

Related Questions