slowcheetah

Web Config Transform not working

梦想的初衷 提交于 2019-11-27 10:54:36
In a .NET MVC 3.0 Application I have the following configuration in appSettings : web.config <appSettings> <add key="SMTPHost" value="mail.domain.com"/> <add key="SMTPUsername" value="user@gmail.com"/> <add key="SMTPPort" value="25"/> <add key="SMTPPwd" value="mypassword"/> <add key="EmailFrom" value="notific@gmail.com"/> </appSettings> For debugging, I have the following configuration transform defined: web.Debug.config <appSettings> <add key="SMTPPort" value="58" xdt:Transform="Replace" xdt:Locator="Match(key)" /> </appSettings> And I run the application in debug mode, but my SMTP port is

VS 2010 Web.config transformations for debugging

橙三吉。 提交于 2019-11-27 04:24:00
问题 I’m a fan of the new VS 2010 Web.config transformations. I use this feature for deployment purposes and wondered if it is possible to use them for debugging too. I think of using them in the IDE: I want to create different built configuration (with linked transformation configurations); choose one of them; start the web site in the IDE and debug the different configurations this way. 回答1: Update Thanks to a 3rd party plugin, SlowCheetah, this is now possible. Scot Hanselman has a blog post

Web.config is not transformed when debugging code

北城以北 提交于 2019-11-26 19:45:27
问题 I have a main Web.config file, and under that there is a Web.Test.config , Web.Development.Config etc. When I preview the transformation via SlowCheetah on the Test config, it appears to transform the values correctly. When I switch my build environment from Development to Testing and try to debug the application, the application runs under whatever values are in the main Web.config file (i.e. it is not transforming anything). How do I make the build environment pick the correct config when

Web Config Transform not working

偶尔善良 提交于 2019-11-26 15:22:26
问题 In a .NET MVC 3.0 Application I have the following configuration in appSettings : web.config <appSettings> <add key="SMTPHost" value="mail.domain.com"/> <add key="SMTPUsername" value="user@gmail.com"/> <add key="SMTPPort" value="25"/> <add key="SMTPPwd" value="mypassword"/> <add key="EmailFrom" value="notific@gmail.com"/> </appSettings> For debugging, I have the following configuration transform defined: web.Debug.config <appSettings> <add key="SMTPPort" value="58" xdt:Transform="Replace" xdt

App.Config Transformation for projects which are not Web Projects in Visual Studio?

[亡魂溺海] 提交于 2019-11-25 22:34:41
问题 For Visual Studio 2010 Web based application we have Config Transformation features by which we can maintain multiple configuration files for different environments. But the same feature is not available for App.Config files for Windows Services/WinForms or Console Application. There is a workaround available as suggested here: Applying XDT magic to App.Config. However it is not straightforward and requires a number of steps. Is there an easier way to achieve the same for app.config files?