简体   繁体   中英

How do I use XDT transforms with my own XML file?

How to I tell my MSBuild (probably in my project file) that I want to use XDT transforms on my own XML file? I have the standard Web.config and Web.Release.config which Visual Studio shows as a dependent file of Web.config. I also have foo.config and foo.Release.config.

  1. The Release version is not displaying as dependent on foo.config. It is just displaying as a normal content file.

  2. More importantly, the transform doesn't happen on build. No errors - it just isn't even trying to merge the files.

I assume the two issues are related. If I get them configured correctly, the transforms will just work as expected.

If it matters, I am using VS2013.

It's not made for that but there is SlowCheetah - XML Transforms This package enables you to transform your app.config or any other XML file based on the build configuration .

It appears the author has wanted Microsoft to incorporate into Visual Studio. He's not going to add support for VS 2014. See here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM