We use SlowCheetah configuration conversions to manage the configuration, so in each of my web applications I have:
> Web.config > Web.debug.config > Web.release.config
I want to include the appSetting transform element in the NuGet package, which will be added to the Web.release.config file when the package is installed (and then applied when the project is really packaged in Release mode)
Following the approach used to convert the actual web.config using the web.config.transform , I tried to add the NuGet\Content\web.release.config.transform to my NuGet package, which looks like this:
<?xml version="1.0" encoding="utf-8" ?> <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <appSettings> <add key="apiUsername" value="my_user" xdt:Transform="Replace" xdt:Locator="Match(key)" /> <add key="apiPassword" value="my_pass" xdt:Transform="Replace" xdt:Locator="Match(key)" /> </appSettings> </configuration>
Does not work. The web.config file is converted, but the configuration files. *. Config not changed:
Attempting to resolve dependency 'NewtonSoft.Json (≥ 4.5.7)'. Successfully installed 'Newtonsoft.Json 4.5.7'. Successfully installed ''MyProject.Package 1.0.7409-unstable'. Successfully added 'Newtonsoft.Json 4.5.7' to FortKnox.Web. 'web.debug.config' already exists. Skipping... 'web.release.config' already exists. Skipping... Successfully added 'MyProject.Package 1.0.7409-unstable' to MyThing.Web
Any ideas?
Dylan beattie
source share