难道我是唯一一个获得"汇编不可用当前的目标框架和QUOT;? [英] Am I the only one getting "Assembly Not Available in the Currently Targeted Framework"?

查看:178
本文介绍了难道我是唯一一个获得"汇编不可用当前的目标框架和QUOT;?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾与Visual Studio 2010和任何框架版本的一个长期存在的问题报告这个错误,将一个测试项目后:

I have had a persistent problem with Visual Studio 2010 and any framework version reporting this error, after adding a test project:

集结号不可用在当前的目标框架

"Assembly Not Available in the Currently Targeted Framework"

到目前为止,我已经有这种情况发生,只有两个组件,并始终坚持:

So far, I have had this happen with only two assemblies, and always consistently:

      
  • System.ServiceProcess
  •   
  • System.Configuration.Install
  •   

的问题是,该项目的文件不识别特定的框架版本为这些参考文献,表示在属性0.0.0.0版本。我可以解决此通过手动改变项目文件为包括LT; SpecificVersion>真< / SpecificVersion>在参考元件

The problem is that the project file does not identify a specific framework version for these references, showing version 0.0.0.0 in the properties. I can work around this by manually altering the project file to include <SpecificVersion>True</SpecificVersion> in the reference element.

这是一个问题,因为我无法继承或实现这些有问题的组件鼹鼠类型。问题是,Pex的痣产生他们自己的项目文件,这些文件也坏了,在构建过程中。有没有机会手动修复这些,我认为这只是傻在使用ICorProfilerCallback.JITCompilationFinished得到任何编译建立一个解决方法。

This is a problem, because I am unable to Mole types that inherit or implement these problematic assemblies. The issue is that Pex and Moles generate their own project files, which are also broken, during the build process. There is no opportunity to manually fix these, and I think it's just stupid to have to build a workaround using ICorProfilerCallback.JITCompilationFinished to get anything to compile.

因此​​,没有任何人有这个问题?我已经重新安装了VS2010。我没有看到任何修复这一点。

So, does anyone else have this issue? I have already re-installed VS2010. I don't see any fix for this.

我也肯定这研究,并一直在努力围绕这一切的一年。我得到这个相当恼火,并认为有些事情简直出了错或者我不明白,这是预期的行为(我想不通为什么...)。

I have most certainly researched this, and have been working around it all year. I'm getting rather annoyed by this, and think something has simply gone wrong or I don't understand that this is intended behavior (I can't imagine why...).

推荐答案

Visual Studio 2010中生成以下参考元素,在.csproj的文件:

Visual Studio 2010 generated the following reference elements, in the .csproj files:

<Reference Include="System.Configuration.Install" />
<Reference Include="System.ServiceProcess" />

要解决此问题,XML必须进行修改,以:

To correct the problem, the XML must be modified, to:

<Reference Include="System.Configuration.Install">
    <SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="System.ServiceProcess">
    <SpecificVersion>True</SpecificVersion>
</Reference>

这篇关于难道我是唯一一个获得&QUOT;汇编不可用当前的目标框架和QUOT;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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