Sunday, October 24, 2010

Config files and XDT or Config Transforms

 

In VS 2010 there is a new feature to transform your config file for the active configuration. (for example –> Debug / Release)

All you need to do is right click on the web.config en select config transforms.

configtransforms

Now this feature is only available for Web.config files. Bedroefde emoticon

image
But i google do the search for me and i found a solution for app.config Glimlach 

image

How you do it can you find out in this blogpost written by Vishal Joshi

Now i work with this technique and i had some problems with the web.config.

Some times i get this message:

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. 
This error can be caused by a virtual directory not being configured as an application in IIS.
   

What i did to get it work:

  • Clean Project
  • Make shure that the bin folder is empty
  • Rebuild project
  • Result --> error is gonne

 

Enjoy …

No comments: