如何避免重复的app.config使用Visual Studio 2008单元测试? [英] How to avoid duplicate app.config using Visual Studio 2008 unit testing?

查看:167
本文介绍了如何避免重复的app.config使用Visual Studio 2008单元测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在我的主要项目中的一个app.config中我总是把它复制到它的测试项目。如何避免呢?

When I have one app.config in my main project I always have to duplicate it to its test project. How to avoid it?

更新我也问了<一href="http://stackoverflow.com/questions/484266/how-to-avoid-duplicate-app-config-using-visual-studio-2008-unit-testing-when-usin">a非常相似,稍复杂的问题

推荐答案

添加它作为一个地方的链接。选择项目作为一个与真实的app.config之一,它链接到其他项目。

Add it as a link from a single place. Choose one of the projects as the one with the real app.config and link it to the other projects.

添加 - >现有项 - >导航到配置文件 - >添加为链接(向下箭头在添加按钮)

Add -> Existing Item -> Navigate to config file -> add as link (the down arrow in the Add button)

这篇关于如何避免重复的app.config使用Visual Studio 2008单元测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆