开发者

How to prevent MSDeploy task from rebuilding assemblies?

I am running an TeamCity Build Server that builds and deploys a asp.net 4.0 application. I need to obfuscate the assemblies of prior to deployment. I have two build configurations. One is SVN triggered that compiles and packages. Packaging is done through: - Calling MSBuild with web project file as build file - using the following parameters: /T:Package

The second configuration is manually triggered and only does deployment. Again, it calls MSBuild and uses the following parameters:

/P:Configuration=%env.Configuration% /P:DeployOnBuild=False /P:DeployTarget=MSDeployPublish /P:MsDeployServiceUrl=https://%env.TargetServer%/MsDeploy.axd /P:AllowUntrustedCertificate=True /P:MSDeployPublishMethod=WMSvc /P:CreatePackageOnPublish=False /P:UserName=Administrator /P:Password=%env.DeployPassword%

As you can see, DeployOnBuild is set to false, as well as CreatePackageOnPublish. Still, when I run this build configuration, the assemblies are rebuilt.

I would like have a step prior to deployment that obfuscates the assemblies. And then have the deployment step simply deploy the obfuscated assemblies. How do I need to call MSu开发者_JAVA技巧ild in order for it to skip the compile step and move immeditely to publish?

Another that is manually triggered and only does deployment.


The Package target is defined in the Microsoft.Web.Publishing.targets file. If you have a look in there you will see extensibility points.

This blog post on Extending the MSBuild Package target gives some examples.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜