2

Closed

Config files from the Config folder are transformed but not there in the deploy package in the end

description

Log4net.config and HostComponents.config are properly transformed with their target-specific counterparts together with Web.config but the deploy package (created through e.g. VS Publish) doesn't contain the transformed versions (however, contains the raw ones: the parent config and the two transforming versions too).

This is caused by the line <_CustomFiles Include=... in the Web.csproj that explicitly adds the Config folder, overwriting the transformed files. Removing Config from this enumeration fixes the issue.

On a related note the old Content references to these two files are still present in Orchard.Web.csproj, causing the confusing case where the parent files are listed twice when looking at the project in VS. The old references can be safely removed, i.e:
-    <Content Include="Config\log4net.config">
-      <SubType>Designer</SubType>
-    </Content>
-    <Content Include="Config\HostComponents.config">
-      <SubType>Designer</SubType>
-    </Content>
I'd welcome feedback on the above fixes, that's why I haven't pushed them but if they're right I'd add them to the source.
Closed Sep 3, 2013 at 10:09 PM by Piedone
Fixed by Daniel Stolt

comments