问题描述
.net 3.5 百家乐凯发k8的解决方案在使用 msbuild 编译时出现此警告.
a .net 3.5 solution ended up with this warning when compiling with msbuild.
有时 ndepend 可能会有所帮助,但在这种情况下,它没有提供任何进一步的细节.像 bob 我最终不得不求助于打开每个程序集ilda** 直到我找到引用旧版本依赖程序集的那个.
sometimes ndepend might help out but in this case it didn't give any further details. like bob i ended up having to resort to opening each assembly in ilda** until i found the one that was referencing an older version of the dependant assembly.
我确实尝试使用 vs 2010 beta 2 中的 msbuild(因为 connect 文章指出这已在 clr 的下一版本中修复),但也没有提供更多细节(可能在 beta 2 后修复)
i did try using msbuild from vs 2010 beta 2 (as the connect article indicated this was fixed in the next version of the clr) but that didn't provide any more detail either (maybe fixed post beta 2)
有没有更好(更自动化)的方法?
is there a better (more automated) approach?
推荐答案
将msbuild 项目构建输出详细程度"更改为详细"或以上.为此,请按以下步骤操作:
change the "msbuild project build output verbosity" to "detailed" or above. to do this, follow these steps:
- 打开选项对话框(工具 -> 选项...).
- 在左侧树中,选择 projects and solutions 节点,然后选择 build and run.
- 注意:如果此节点未显示,请确保对话框底部的复选框显示所有设置已选中.
- bring up the options dialog (tools -> options...).
- in the left-hand tree, select the projects and solutions node, and then select build and run.
- note: if this node doesn't show up, make sure that the checkbox at the bottom of the dialog show all settings is checked.
在出现的工具/选项页面中,根据您的版本将 msbuild 项目构建输出详细程度 级别设置为适当的设置:
in the tools/options page that appears, set the msbuild project build output verbosity level to the appropriate setting depending on your version:
- 诊断在 vs2012、vs2013 或 vs2015 上时(这些版本中的消息说您应该使用详细",但这是完全错误的,您应该使用诊断")
- 详解当你在 vs2010 上时
- 普通在 vs2008 或更早版本中就足够了.
- diagnostics when on vs2012, vs2013 or vs2015 (the message in these versions says you should use "detailed", but this is plain wrong, you should use "diagnostics")
- detailed when you're on vs2010
- normal will suffice in vs2008 or older.
查看 msbuild 消息.resolveassemblyreferences 任务是 msb3247 的起源任务,应该可以帮助您调试此特定问题.
check out the msbuild messages. the resolveassemblyreferences task, which is the task from which msb3247 originates, should help you debug this particular issue.
我的具体情况是对 sqlserverce 的错误引用.见下文.我有两个项目引用了两个不同版本的 sqlserverce.我去了旧版本的项目,删除了引用,然后添加了正确的引用.
my specific case was an incorrect reference to sqlserverce. see below. i had two projects referencing two different versions of sqlserverce. i went to the project with the older version, removed the reference, then added the correct reference.
target resolveassemblyreferences: consider app.config remapping of assembly "system.data.sqlserverce, ..." from version "3.5.1.0" [h:...debugsystem.data.sqlserverce.dll] to version "9.0.242.0" [c:program filesmicrosoft visual studio 8common7idepublicassembliessystem.data.sqlserverce.dll] to solve conflict and get rid of warning. c:window**icrosoft.netframeworkv3.5microsoft.common.targets : warning msb3247: found conflicts between different versions of the same dependent assembly.
<小时>
您不必打开每个程序集来确定引用程序集的版本.
you do not have to open each assembly to determine the versions of referenced assemblies.
- 您可以检查每个参考的属性.
- 打开项目属性并检查参考部分的版本.
- 使用文本编辑器打开项目.
- 使用 .net reflector.