web-config-transform

How avoid *.<Environment>.config transformations being deployed on server

孤人 提交于 2021-02-07 14:54:56
问题 I'm using VSTS to deploy at several environments. And as usual, some parameters on config files need to be different depending the environment, hence I will use config transformations to deploy it at the target environment. Since I want to have the package with both the config and the transform that will be applied later I set the Build Action as Content as such: <Content Include="App_Config\MyConfig.config" /> <Compile Include="App_Config\MyConfig.prod.config"> <DependentUpon>MyConfig.config

Publish is not transforming web.config?

℡╲_俬逩灬. 提交于 2020-03-18 10:35:38
问题 I made a web.config ( full file , it doesn't show XML errors) <?xml version="1.0"?> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <configSections> ... <location path="." inheritInChildApplications="false"> <connectionStrings> <add name="ElmahLog" connectionString="data source=~/App_Data/Error.db" /> <add name="database" connectionString="w" providerName="System.Data.EntityClient"/> </connectionStrings> </location> ... with a transform file ( web.Staging.config )

Web.config Build vs Release transform not working

佐手、 提交于 2020-01-09 10:35:07
问题 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 uploading the project to my webserver and running it from the browser). Until now I have always manually changed the database connection string in the Web.config file to switch between the two (basically I had to connection strings, one named 'Debug' and

Web.config Build vs Release transform not working

岁酱吖の 提交于 2020-01-09 10:34:28
问题 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 uploading the project to my webserver and running it from the browser). Until now I have always manually changed the database connection string in the Web.config file to switch between the two (basically I had to connection strings, one named 'Debug' and

Web.Debug.config vs. Web.Release.config running web app in localhost

此生再无相见时 提交于 2020-01-05 07:17:48
问题 I have a Web.config file with some entries in there but depending on whether I am in Debug or Release mode when I execute my Web Application locally , I want to take different appSettings. For instance, let's say that I have the following entry in my Web.Debug.config appSettings. <add key="MyServiceUrl" value="http://my-test-site:8080/" /> And also I have this in my Web.Release.config: <add key="MyServiceUrl" value="http://my-prod-site:80/" /> How should I configure my Web.Config, Web.Debug

Select node based on child node value in Web.config Transform

主宰稳场 提交于 2020-01-01 05:36:13
问题 I have the following XML in my web config and I would like to select an attribute for removal using web.config transforms, but I would like to select the element for removal based on the value of one of the child elements. My web.config is something like this: <configuration> <sitecore> <scheduling> <agent type="Sitecore.Tasks.DatabaseAgent"> <param desc="database">core</param> </agent> <agent type="Sitecore.Tasks.DatabaseAgent"> <param desc="database">master</param> </agent> </scheduling> <

Applying web.config transformations locally

爷,独闯天下 提交于 2019-12-30 18:50:14
问题 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? 回答1: It depends on which dev server you are using. As @Citronas said on this answer: It

Web transformation files get copied to root + bin

回眸只為那壹抹淺笑 提交于 2019-12-23 15:53:25
问题 I recently upgrade my project to vs 2010. One of the main reasons for doing so is the addition of web transformation files. With my existing project upgraded : i clicked Add Config Transforms, i updated a simple value from my config for testing purposes and i published my project to the file system. What i expected was to find 1 transformed web.config in my root folder. What i found was 1 transformed web.config + all my config transformation files as well: Web.Debug.config , web.Release

Transforming included configuration files using configSource

旧巷老猫 提交于 2019-12-20 23:27:11
问题 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