1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | < Target Name = "MvcBuildViews" AfterTargets = "AfterBuild" Condition = "'$(MvcBuildViews)'=='true'" > < ItemGroup > < DeleteAfterTransform Include = "$(OutDir)_PublishedWebsites\$(TargetName)\Web.*.config" Exclude = "$(OutDir)\_PublishedWebsites\$(TargetName)\Web.config" /> </ ItemGroup > < AspNetCompiler VirtualPath = "temp" PhysicalPath = "$(WebProjectOutputDir)" /> < Message Text = "WebProjectOutputDir: $(WebProjectOutputDir)" Importance = "low" /> < Message Text = "OutDir: $(OutDir)" Importance = "low" /> < Message Text = "TargetName: $(TargetName)" Importance = "low" /> < Message Text = "ProjectConfigTransformFileName: $(ProjectConfigTransformFileName)" Importance = "low" /> < TransformXml Source = "Web.config" Transform = "$(ProjectConfigTransformFileName)" Destination = "$(OutDir)\_PublishedWebsites\$(TargetName)\Web.config" /> < Message Text = "Preparing to remove config transform files." /> < Message Text = "Files: @(DeleteAfterTransform)" /> < Delete Files = "@(DeleteAfterTransform)" > < Output TaskParameter = "DeletedFiles" PropertyName = "deleted" /> </ Delete > < Message Text = "Deleted Files: $(deleted)" /> </ Target > |
Monday, March 12, 2012
remove web transform files
Today I am sharing the process that I used to remove web.config transforms after a build. I wish that I could claim that I was able to implement this in a knowledge vacuum, but I had some help. As you can see, all I am doing is creating a list of all files not named web.config and then deleting them.
I hope that you find this post useful.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment