Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I try to solve this trouble for 3 days and i think i need your help guys. I use VS13.

I made some custom configs, under Web.config. The process of made is as usual with Configuration Manager and "Add Config Transforms". Lets call one of my custom configs "Custom1". So i made Web.Custom1.config.

In this config i insert only that conncetionstrings,appsettings and client options that i want to replace using replace transform and match locator, i.e. xdt:Transform="Replace" xdt:Locator="Match(key)"

Everything look fine. I choose the config from "Solution Configurations", build successful without any error. After build i look into XML Configuration in the windows folder and each key,address,name and everything is replaced correctly.

And now when I want to Start something is wrong. I use a breakpoint to see, what is matched to the ConnectionString. To my surprise the ConnectionString.Value is localhost o.O.

Now my question is why? What i made wrong, what i need to do. Why after build the config looks fine and after Start, config "returns" to localhost? I read a lot of solutions but no one help me.

I will be really grateful if someone help me and tell me (pref in steps :P) what should i do. Thanks a lot.
Posted
Updated 23-Jul-15 21:09pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900