Questions tagged [web-config-transform]

Web.config transformation lets you easily transform .NET application configuration files.

Web.config transformation lets you easily transform .NET application configuration files for different build configurations (eg, development, debug, release).

Links

177 questions
583
votes
15 answers

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

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…
Amitabh
  • 59,111
  • 42
  • 110
  • 159
199
votes
4 answers

Is there any way to do a "Replace Or Insert" using web.config transformation?

I'm using web.config transformation as described in the below post in order to generate configs for different environments. http://vishaljoshi.blogspot.com/2009/03/web-deployment-webconfig-transformation_23.html I can do a "Replace" transformation…
Chris Haines
  • 6,445
  • 5
  • 49
  • 62
108
votes
2 answers

Web Config Transformation to add a child element

I've got the following configuration in web.config:
Ben Foster
  • 34,340
  • 40
  • 176
  • 285
103
votes
10 answers

Web Config Transform not working

In a .NET MVC 3.0 Application I have the following configuration in appSettings: web.config
HaBo
  • 13,999
  • 36
  • 114
  • 206
81
votes
2 answers

How to remove a ConnectionString using Config Transformations

I have a Web.config with several ConnectionStrings
Didaxis
  • 8,486
  • 7
  • 52
  • 89
72
votes
6 answers

MSBuild Script and VS2010 publish apply Web.config Transform

So, I have VS 2010 installed and am in the process of modifying my MSBuild script for our TeamCity build integration. Everything is working great with one exception. How can I tell MSBuild that I want to apply the Web.conifg transform files that…
xspydr
  • 3,030
  • 3
  • 31
  • 49
55
votes
5 answers

Web Config Transforms: Insert If Not Exists

I would like to apply a transformation if and only if a matched element does not exist in the target. Trying various xpath expressions using http://webconfigtransformationtester.apphb.com/ but no luck so far. E.g. if the target web.config looks like…
João Bragança
  • 1,353
  • 1
  • 13
  • 29
46
votes
4 answers

How do I make URL rewrite work with web.Release.config transform?

I have a web.config rewrite rule specified to move all traffic to https. The rule works, but I don't want SSL required while I am debugging. I have a bunch of web.release.config transformations being done already that work on publish so I decided to…
Matthew Kruskamp
  • 1,887
  • 2
  • 14
  • 31
31
votes
1 answer

What is the right xdt:Locator parameter to transform this node?

I have the following in my app.config file. I am using Slow Cheetah and just want to replace replace configuration/entityFramework/defaultConnectionFactory/parameters/parameter so it points to a diff server. ie value-data source=some-server.... …
etoisarobot
  • 7,684
  • 15
  • 54
  • 83
30
votes
3 answers

TFS 2012 and web.config transforms

I am trying to have my TFS Build create the web.config transform associated with the configuration I selected for my build. When I run the build I check the web.config file no transforms have been applied. When I a publish from VS2012 the transform…
Nathan Greenway
  • 348
  • 1
  • 3
  • 8
29
votes
6 answers

Web.config Build vs Release transform not working

I have an ASP.NET Web Application project that connects to a remote database via the Entity Framework. During debugging (eg running the project on my local computer), the IP address to the database is different than during release (eg after…
Nick Thissen
  • 1,802
  • 4
  • 27
  • 38
26
votes
1 answer

XDT Transform: InsertBefore - Locator Condition is ignored

I have a web.config file in which I need to either insert the element or manipulate children of that node if it already exists. If it already exists I don't want to insert it again (obviously, as it is only allowed to exist…
sebastiaan
  • 5,870
  • 5
  • 38
  • 68
22
votes
4 answers

web.config transform - delete comments from connectionstring section

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…
davids
  • 5,397
  • 12
  • 57
  • 94
20
votes
2 answers

Is there a way to "insert" a new section into Web.Config using transforms?

In my Web.Config I have the following **some code** **some code** How do I transform it so I can inject a new sub section for…
Paul Brown
  • 4,926
  • 9
  • 32
  • 44
18
votes
2 answers

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

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…
Paul Rowland
  • 8,244
  • 12
  • 55
  • 76
1
2 3
11 12