web-config-transform

How can I get attribute from subsection webconfig C#?

时光毁灭记忆、已成空白 提交于 2019-12-12 01:47:50
问题 I try to get all attibutes from one subsection, but section have many subsection and the aplication didn't recognize, how can I do? this is my webconfig: <configSections> <section name="Seccion" type="ManejoConfiguracion.SeccionConfig,ManejoConfiguracion"/> </configSections> <Seccion> <BD> <add key="name" value="dbKey" /> <add key="user" value="userBD" /> <add key="pass" value="123BD" /> </BD> <ReportingService> <add key="name" value="Reporting" /> <add key="user" value="userReport" /> <

How can I enable “Treat Warnings as Errors” for my TransformXml task?

那年仲夏 提交于 2019-12-10 15:39:01
问题 I'm using the following (heavily simplified) MSBuild script: <?xml version="1.0"?> <Project DefaultTargets="Transform" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll" /> <Target Name="Transform"> <TransformXml Source="../web.config" Transform="Config\Production\webapp.xml" Destination="Config\Build\Production\web.config" /> </Target> <

MSBuild - how to force “AfterBuild” target when I do deployment?

断了今生、忘了曾经 提交于 2019-12-10 13:08:33
问题 I have the following setup: ASP.Net MVC .Net 4.0 solution with 5 projects in it, and several solution configurations ( Site1-Stage, Site1-Live, Site2-Stage , etc). The reason for this is simple - we deploy same codebase to multiple servers with different config settings. To manage these configurations, I use the approach described by Troy Hunt in his You're deploying it wrong! TeamCity, Subversion & Web Deploy part 1: Config transforms article. In 2 words - I do NOT have web.config in my SVN

Can multiple build configs share one config transformation?

匆匆过客 提交于 2019-12-07 05:11:02
问题 I'm using SlowCheetah for XML transforming a bunch of config files in a project. However, this same solution is part of a load balanced setup, where some config values differ between the different servers (two, in this case). I have the following build configs Debug Release Release.Test Release.Prod1 Release.Prod2 Almost everything in Release.Prod1 and Release.Prod2 is identical, except for some values in one of the config files. Is there any way I can have a file like Something.Release.Prod

Web.config-style transforms for App.config files for C# Console apps?

二次信任 提交于 2019-12-07 05:04:40
问题 My team is in love with publish profiles. We have a number of testing environments that we work in, and using Web.config transforms we're able to substitute the names of machines in each environment, configuration settings, etc, which makes our build/deploy/test process much easier. For example: Web.config Web.dev.config Web.int.config Web.prod.config However, we have a number of test applications that we use to hit our web services, implemented as Console applications. We'd like to be able

How to replace a web.config setting with the current date while using webdeploy?

与世无争的帅哥 提交于 2019-12-07 02:48:46
问题 I'm using a web.config transform to replace settings with the settings of the selected solution configuration. However, I would like to add a setting that stores the datetime of the publish process. The reason for this is to be able to show a "Last published on" for my customers. Using config transforms, is there a way to replace a setting with the current date? 回答1: I think you're going to need to use a customer MSBuild task to apply the change. My wife blogged about adding custom tasks to

Web config transform for custom section

旧时模样 提交于 2019-12-06 00:26:47
问题 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

Can multiple build configs share one config transformation?

北战南征 提交于 2019-12-05 11:17:22
I'm using SlowCheetah for XML transforming a bunch of config files in a project. However, this same solution is part of a load balanced setup, where some config values differ between the different servers (two, in this case). I have the following build configs Debug Release Release.Test Release.Prod1 Release.Prod2 Almost everything in Release.Prod1 and Release.Prod2 is identical, except for some values in one of the config files. Is there any way I can have a file like Something.Release.Prod.Config to be used on both of these build configs instead of having two identical files ( Something

Web.config-style transforms for App.config files for C# Console apps?

烂漫一生 提交于 2019-12-05 07:52:38
My team is in love with publish profiles. We have a number of testing environments that we work in, and using Web.config transforms we're able to substitute the names of machines in each environment, configuration settings, etc, which makes our build/deploy/test process much easier. For example: Web.config Web.dev.config Web.int.config Web.prod.config However, we have a number of test applications that we use to hit our web services, implemented as Console applications. We'd like to be able to do the same type of transforms on these config files, so that we can reduce manual labor of testing

How to replace a web.config setting with the current date while using webdeploy?

♀尐吖头ヾ 提交于 2019-12-05 05:32:26
I'm using a web.config transform to replace settings with the settings of the selected solution configuration. However, I would like to add a setting that stores the datetime of the publish process. The reason for this is to be able to show a "Last published on" for my customers. Using config transforms, is there a way to replace a setting with the current date? I think you're going to need to use a customer MSBuild task to apply the change. My wife blogged about adding custom tasks to the build process (as she understands these things better than I). You might find some useful information on