简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM