user1016945
user1016945

Reputation: 897

TFS 2010 Build MVC 3 Application Apply Config Transformation

I have an MVC 3 apllication with several config transforms. In TFS build definition I set MSBuild Arguments in Advanced section to /p:DeployOnBuild=True /t:TransformWebConfig /p:Configuration=Release. But it has no effect. What is wrong?

Upvotes: 0

Views: 401

Answers (1)

user1016945
user1016945

Reputation: 897

I found solution here. Just need to modify website project file:

 <Target Name="AfterBuild">
  <TransformXml Condition="Exists('$(OutDir)\_PublishedWebsites\$(TargetName)')" Source="Web.config" Transform="$(ProjectConfigTransformFileName)" Destination="$(OutDir)\_PublishedWebsites\$(TargetName)\Web.config" />
 </Target>

Upvotes: 1

Related Questions