I have a class library that has app.config with transformations as app.Dev.config, app.Test.config. This class library is used by a web Api that had web.config transformations as follows: Web.Dev.config, Web.Test.config. When the web api is published in DEV, it correctly uses the web.dev.config, however, for the class library it uses the app.config instead of app.dev.config
I am using ConfigurationTransform from https://marketplace.visualstudio.com/items?itemName=GolanAvraham.ConfigurationTransform
I also tried the solution from: App.Config Transformation for projects which are not Web Projects in Visual Studio?
app.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="connectionUri" value="https://ssrsservice-test.azurewebsites.net" />
</appSettings>
</configuration>
app.Dev.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="connectionUri" value="https://ssrsservice-dev.azurewebsites.net" xdt:Transform="Replace" xdt:Locator="Match(key)"/>
</appSettings>
</configuration>
After trying the above methods, the connectionUri is always the test one(from app.config) instead of using the dev.