web-config-transform

Web config transform on microsoft.identityModel - 'http://schemas.microsoft.com/XML-Document-Transform' attribute is not declared

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 16:04:57
问题 I have got a Web.Release.config that is successfully transforming a connection string. When I add a microsoft.identityModel section I get a warning saying The 'http://schemas.microsoft.com/XML-Document-Transform' attribute is not declared And the transform doesnt work on that section. What am I missing to get the transform to work? Complete Web.Release.config here <?xml version="1.0"?> <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <connectionStrings> <add

web.config transform - delete comments from connectionstring section

▼魔方 西西 提交于 2019-12-04 15:36:05
问题 I store several different connection strings in my web.config for development and testing. All but one is commented out so I can change info as needed. When I publish, I would like to replace everything (including comments) in the connectionStrings node with this: <add name="myDb" connectionString="Data Source={SERVER};Initial Catalog=ManEx;User Id={USER};Password={PASSWORD};" providerName="System.Data.SqlClient" /> <!--<add name="myDb" connectionString="Data Source={SERVER};Initial Catalog

How do I enable IntelliSense in VS 2013 for <rewrite> in transform .config?

跟風遠走 提交于 2019-12-04 06:40:27
I decided I wanted to move some rewrite rules into our web.release.config and web.staging.config files in order to keep the rewrite rules relevant to the environments our different configurations run on. IntelliSense didn't like this decision and wouldn't play ball because: xdt:Transform "attribute is not declared" for the <rewrite> element. I looked at RuslanY's solution here and I considered several solutions on this site but none of them provided the solution to this particular problem in VS 2013 with .NET v4.5. I have also studied this old MSDN post here and ensured the Schemas property of

Web config transform for custom section

本小妞迷上赌 提交于 2019-12-04 04:46:54
I have numerous different Web.configs in my MVC 5 Application for different environments - e.g. Test/Prod I have web transforms in place to change values for the different environments. So for example I have the following app setting in my web.config file: <appSettings> <add key="DevDisplayPanel" value="true" /> </appSettings> Then in my Web.Test.config and Web.Prod.config using a web transform to change the value as below: <appSettings> <add key="DevDisplayPanel" xdt:Transform="Replace" xdt:Locator="Match(key)" value="false" /> <appSettings> However in my Web.config I also have my own custom

web.config transform - delete comments from connectionstring section

纵饮孤独 提交于 2019-12-03 09:44:20
I store several different connection strings in my web.config for development and testing. All but one is commented out so I can change info as needed. When I publish, I would like to replace everything (including comments) in the connectionStrings node with this: <add name="myDb" connectionString="Data Source={SERVER};Initial Catalog=ManEx;User Id={USER};Password={PASSWORD};" providerName="System.Data.SqlClient" /> <!--<add name="myDb" connectionString="Data Source={SERVER};Initial Catalog=ManEx;Integrated Security=True" providerName="System.Data.SqlClient" />--> I know how to change the

Transforming included configuration files using configSource

末鹿安然 提交于 2019-12-03 08:16:28
This question is kind of a two parter. In VS2015 my MVC project has multiple different build configurations, Test, UAT, Live etc. With my web.config I can simply right click it and select Add Config Transform to create the transform files for each build configuration. If I have an external config file, such as Log4Net.config how can I configure this to have dependant transforms like web.config ? Is this done manually by editing the project.csproj file ? Secondly, I have a web.config file thus : <configuration> <configSections> <section name="log4net" type="log4net.Config

Can I force the installer project to use the .config file from the built solution instead of the original one?

白昼怎懂夜的黑 提交于 2019-12-03 05:15:34
问题 I am using the solution to this question in order to apply configuration changes to App.config in a Winforms project. I also have an installer project for the project that creates an installable *.msi file. The problem is, the config file bundled in the installers is the original, un-transformed config file. So we're not getting the production connection strings in the production installer even though the config file for the built winforms project has all the correct transformations applied.

Can I force the installer project to use the .config file from the built solution instead of the original one?

浪尽此生 提交于 2019-12-02 18:32:39
I am using the solution to this question in order to apply configuration changes to App.config in a Winforms project. I also have an installer project for the project that creates an installable *.msi file. The problem is, the config file bundled in the installers is the original, un-transformed config file. So we're not getting the production connection strings in the production installer even though the config file for the built winforms project has all the correct transformations applied. Is there any way to force the installer project to use the output of project build? Miguel Angelo First

Applying web.config transformations locally

心已入冬 提交于 2019-12-01 17:22:16
I have a transform for my web.config that currently works if I publish to Azure, but it's not working locally when I build/run. How can I go about "Publishing" locally so the Local transformations are applied to my web.config on my dev box? Currently I right-click > publish to Azure, do I need to create a new publish profile for my local box? Is there any way to get the transforms to work on Build instead? Superzadeh It depends on which dev server you are using. As @Citronas said on this answer : It depends on how you debug. If you are using Cassini, afaik your web.config contents will be read

Inserting multiple items with Web.Config transforms

被刻印的时光 ゝ 提交于 2019-12-01 02:52:39
问题 I've got a C# project that references a lot of WCF services. For local testing, I want to replace the contents of the identity tags so that it will accept anything running on localhost. The following transformation works, but only inserts the dns element in the first matching location. So, if I had 5 endpoints referenced, one would have the dns tag, and the others would all have empty identity elements. <system.serviceModel> <client> <endpoint> <identity> <dns xdt:Transform="Insert" value=