TFS online build change web.config
概要
TFS online 自动编译时如何修改web.config
步骤
安装Release Management Utility tasks
https://marketplace.visualstudio.com/items?itemName=ms-devlabs.utilitytasks
将 Tokenizer 添加进BuildStep
http://blogs.blackmarble.co.uk/blogs/rfennell/post/2016/03/01/A-vNext-build-task-and-PowerShell-script-to-generate-release-notes-as-part-of-TFS-vNext-build
编写webConfigReplace.json,并提交到tfs
{
"default": {
"CustomVariables": {
"Variable1": "value1",
"Variable2": "value2"
},
"ConfigChanges": [
{
"KeyName": "/configuration/metaModel",
"Attribute":"configSource",
"Value":"Config\\MetaModel.config"
},
{
"KeyName": "/configuration/connectionStrings",
"Attribute": "configSource",
"Value": "Config\\ConnectionStrings.config"
}
,
{
"KeyName": "/configuration/runtime/assemblyBinding/probing",
"Attribute": "privatePath",
"Value": "bin;binMP;binQF"
}
,
{
"KeyName": "/configuration/system.web/compilation",
"Attribute":"debug",
"Value":"false"
}
]
}
}
注意:此处default为Environment name,若未配置Environment name,则指定default即可
配置Configuration Json filename: $(Build.Repository.LocalPath)/src/XXX/webConfigReplace.json
注意,此处必须使用$(Build.Repository.LocalPath)变量获取文件根路径。
另外,
1)若要使用_XXX_格式替换web.config 中的标记为变量,变量不支持系统内部变量,若要使用系统内置变量,如$(Build.SourceVersion)
可以新建一个用户变量,然后设置其值为$(Build.SourceVersion)
2)若config节点有namespace,则需要指定
{
"NamespaceUrl": "urn:schemas-microsoft-com:asm.v1",
"NamespacePrefix": "asm",
"KeyName": "/configuration/runtime/asm:assemblyBinding/asm:probing",
"Attribute": "privatePath",
"Value": "bin;binMP;binQF"
}
TFS online build change web.config的更多相关文章
- Web.config Transformation Syntax for Web Application Project Deployment
Web.config Transformation Syntax for Web Application Project Deployment Other Versions Updated: Ma ...
- 【Hello CC.NET】自动化发布时 Web.config 文件维护
在 <[Hello CC.NET]CC.NET 实现自动化集成> 的 HellowWorld 中经实现: 1.获取源码 2.编译项目 3.集成测试 4.Ftp发布项目 5.创建安装包 6. ...
- CC.NET-自动化发布时 Web.config 文件维护
[Hello CC.NET]自动化发布时 Web.config 文件维护 在 <[Hello CC.NET]CC.NET 实现自动化集成> 的 HellowWorld 中经实现: 1. ...
- 10 Things ASP.NET Developers Should Know About Web.config Inheritance and Overrides(转)
10 Things ASP.NET Developers Should Know About Web.config Inheritance and Overrides Wednesday, Janua ...
- asp.net设置默认打开页面,Web.config,defaultDocument
The web.config file can be used to set a default document, or list of default documents for your web ...
- 使用Web.Config Transformation配置灵活的配置文件
发布Asp.net程序的时候,开发环境和发布环境的Web.Config往往不同,比如connectionstring等.如果常常有发布的需求,就需要常常修改web.config文件,这往往是一件非常麻 ...
- 转:Transform Web.Config when Deploying a Web Application Project
Introduction One of the really cool features that are integrated with Visual Studio 2010 is Web.Conf ...
- How to Build Office Developer Tools Projects with TFS Team Build 2012
Introduction Microsoft Visual Studio 2012 provides a new set of tools for developing apps for Office ...
- Autofac的注入和web.config配合
public static void BuildMvcContainer() { var builder = new ContainerBuilder(); var assemblys = AppDo ...
随机推荐
- 最短路(bellman)-hdu1217
Dijkstra算法是处理单源最短路径的有效算法,但它局限于边的权值非负的情况,若图中出现权值为负的边,Dijkstra算法就会失效,求出的最短路径就可能是错的. 这时候,就需要使用其他的算法来求解最 ...
- 2017-2018-2 20165220『Java程序设计』课程 结对编程练习_四则运算
需求分析 题目要求 一个命令行程序实现: 自动生成小学四则运算题目(加.减.乘.除) 支持整数 支持多运算符(比如生成包含100个运算符的题目) 支持真分数 统计正确率 需求理解 输入:需要计算的式子 ...
- Fruit Ninja(随机数rand())
链接:https://www.nowcoder.com/acm/contest/163/A来源:牛客网 题目描述 Fruit Ninja is a juicy action game enjoyed ...
- Windows下的Hadoop安装(本地模式)
时隔许久的博客.. 系统为Windows 10,Hadoop版本2.8.3. 虽然之前已经在Linux虚拟机上成功运行了Hadoop,但我还是在Windows上编码更加习惯,所以尝试了在Window上 ...
- 如何在github上搭建网站?
3年前就想写这篇文章了,一直没写,拖到现在,迟到总比不到好,哈哈.github pages只支持静态博客(html,css,js),不支持服务端(php,physon). 一.尝试一下 1.在电脑上安 ...
- Halcon 常用算子使用场合
Chapter 1 :Classification 1.1 Gaussian-Mixture-Models 1.add_sample_class_gmm 功能:把一个训练样本添加到一个高斯混合模型的训 ...
- redis(五)
发布订阅 发布者不是计划发送消息给特定的接收者(订阅者),而是发布的消息分到不同的频道,不需要知道什么样的订阅者订阅 订阅者对一个或多个频道感兴趣,只需接收感兴趣的消息,不需要知道什么样的发布者发布的 ...
- 【C语言程序】让用户输入一句话,输出这句话中每个单词含有多少个字母
#include <stdio.h> #define N 100 //宏定义,用N表示100 int main(int argc, char *argv[]) { ; char s ...
- HDU 5985 Lucky Coins 数学
Lucky Coins 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5985 Description Bob has collected a lot ...
- js动态时间(转)
html代码 <span id="timeShow" show_cur_times()></span> js代码 $(function(){ //设置1秒调 ...