visual-studio-2010 - 如何使用 "Browser"选项卡在 C# 中包含正确的引用

标签 visual-studio-2010

我正在使用 VS2010 C#,我想添加一个在 VS2008 下编译的 .dll 引用;此 .dll 存在 2 个版本:调试和发布。

.dll 不在 .NET、COM 或项目选项卡下,所以我只有“浏览器”选项卡将 .dll 添加到引用中。

我的问题是:如何向 VS 指示在 Release模式下编译时采用发布 .dll 版本并在 Debug模式下进行编译时采用调试 .dll 版本?

谢谢。

最佳答案

实现布赖恩解决方案的更好方法是这样做:

<Reference Include="AjaxControlToolkit">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>path/to/folder/bin/$(Configuration)/AjaxControlToolkit.dll</HintPath>
</Reference>

这将在 Release 和 Debug 之间很好地切换,而不会在您的 References View 中出现两次。

关于visual-studio-2010 - 如何使用 "Browser"选项卡在 C# 中包含正确的引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2859572/

相关文章:

c++ - 构建 Qt 5.3.0 时出错

javascript - CSS 和 JS 的 Visual Studio Code 比较(用于合并)

c++ - 无法将模板类定义与 Visual Studio 2010 上的主程序链接

visual-studio-2010 - 注释左括号和右括号(使用 ReSharper?)

silverlight - Visual Studio崩溃

c# - Visual Studio : How to "Copy to Output Directory" without copying the folder structure?

mysql - 连接 MySQL 和 Crystal Reports v10

c# - 我包含的外部可执行文件的路径是什么?

visual-studio-2010 - Web Deploy打包在我的构建服务器上不起作用

c# - 从 Caliburn Micro 开始的问题