开发者

"Build Deployment Package" VS2010 from script

How is it possible to build a web service deployment package from script.开发者_运维知识库

I can msbuild /target:rebuild /p:Configuration=Debug ".\MyProject.sln" but it does not build the deployment package.


  1. First you need to set up your deployment package settings (if you already have run "Build Deployment Package" go to Step 2):

    go in Project's Properties -> Package/Publish Web and specify the package location.

  2. If you run this command:

    msbuild /T:Package

    it will build the deployment package for you using the .csproj in the directory where you run it and putting the package in the location specified in the project's properties in step 1.

Better run it from the location where your .csproj file is; if the location is different you need to supply the project name:

msbuild <C:\yourLocation\YourProjectName.csproj> /T:Package

Enjoy.


What type of project are you deploying? For most, it's a matter of using a different Target:-

/target: publish
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜