Reputation: 936
I'm new to MSBuild, and all the tutorials I found are quite not for the beginners. I have a build task on TFS that uses the following MSBuild parameters:
/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=True /p:MSDeployPublishMethod=InProc /p:DeployIisAppPath="ABC" /p:MsDeployServiceUrl="http://webserver" /p:UserName="ABC\CBA" /p:Password="abcPwd"
Now as I have other requirements I would like to move these parameters to the project file, but I have no idea where to start or how to do it.
Any indication or link on a good tutorial is welcome.
Upvotes: 0
Views: 545
Reputation: 746
So are you saying that you always want these values for your parameters? If so, then just create a Property Group with those properties in your project file. It would look like this in your project file:
<PropertyGroup>
<DeployOnBuild>true</DeployOnBuild>
<DeployTarget>MsDeployPublish</DeployTarget>
<CreatePackageOnPublish>true</CreatePackageOnPublish>
<MSDeployPublishMethod>InProc</MSDeployPublishMethod>
<DeployIisAppPath>ABC</DeployIisAppPath>
<MsDeployServiceUrl>http://webserver</MsDeployServiceUrl>
<UserName>ABC\CBA</UserName>
<Password>abcPwd</Password>
</PropertyGroup>
I think this is what you're looking for. If my understanding of your needs isn't quite right, let me know and I'll see what I can do to help out.
Upvotes: 1