Tag: slowcheetah

使用msbuild我想用teamcity中的值更新configuration文件

我有一些这样的XML: <?xml version="1.0" encoding="utf-8"?> <XmlConfig instancetype="XmlConfig, Processing, Version=1.0.0.0, Culture=neutral"> <item> <key>IsTestEnvironment</key> <value>True</value> <encrypted>False</encrypted> </item> <item> <key>HlrFtpPutDir</key> <value>C:\DevPath1</value> <encrypted>False</encrypted> </item> <item> <key>HlrFtpPutCopyDir</key> <value>C:\DevPath2</value> <encrypted>False</encrypted> </item> …. </Provisioning.Lib.Processing.XmlConfig> 在TeamCity中,我有很多系统属性: system.HlrFtpPutDir H:\ReleasePath1 system.HlrFtpPutCopyDir H:\ReleasePath2 我可以使用什么types的MsBuild魔法将这些值推送到我的XML文件中? 总共有20个左右的项目。

无法从程序集中加载“SlowCheetah.Xdt.TransformXml”任务

在我的解决scheme的两个项目中安装了慢Cheeath(v。2.5.10.3)后,我收到以下错误: "The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly C:\Users \User\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10.2\SlowCheetah.Xdt.dll. Could not load file or assembly 'file:///C:\Users\User\AppData\Local\Microsoft\MSBuild \SlowCheetah\v2.5.10.2\SlowCheetah.Xdt.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a […]

Webconfiguration转换不起作用

在.NET MVC 3.0应用程序中,我在appSettings有以下configuration: 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> 为了debugging,我定义了以下configuration转换: web.Debug.config <appSettings> <add key="SMTPPort" value="58" xdt:Transform="Replace" xdt:Locator="Match(key)" /> </appSettings> 我以debugging模式运行应用程序,但是我的SMTP端口仍然从web.config获取值,而不是web.Debug.config 。 任何人都可以提出什么可能是错误的这种configuration?

App.Config转换为Visual Studio 2010中不是Web项目的项目?

对于基于Visual Studio 2010 Web的应用程序,我们拥有configuration转换function,通过这些function我们可以为不同的环境维护多个configuration文件。 但是,对于Windows服务/ WinForms或控制台应用程序,App.Config文件不具有相同的function。 有一个解决方法可用这里build议: 应用XDT魔术App.Config 。 然而,这不是直接的,需要一些步骤。 有一个更简单的方法来实现相同的app.config文件?