I am using the new VS2010 Web.config transformation. When i do a publish under the 'Release' solution configuration, i get a folder created called ..obj\Release\TransformWebConfig, which contains the original Web.Config and the transformed Web.Config, in addition to
If i was to then try to re-build my solution using the same 'Release' solution configuration, i get the following build error:
Error 16 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.
Performing a clean solution, and then building seems to get rid of this error. From looking around on the web it appears that this problem is caused because i have multiple web.config files (as a result of the original Web.Config and the transformed Web.Config as mentioned above), but no-one offers any other solutions than to 'turn off using the transformations', which is obviously not the answer.
Does anyone know for definate that this is the reason for my error, and is there a way to stop this from happening withouth having to perform a clean every time?
Rob