痣引用.NET 4大会在.NET 3.5的项目? [英] Moles References a .NET 4 Assembly in a .NET 3.5 Project?

查看:135
本文介绍了痣引用.NET 4大会在.NET 3.5的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2010中使用痣,并一直工作得很好。然而,在这种情况下,摩尔将不起作用。在 mscorlib.Behaviors 组装引用.NET 4集,即使项目设置为.NET 3.5(全)配置文件。

I am using Moles in Visual Studio 2010, and has been working very well. However, in this situation, Moles will not function. The mscorlib.Behaviors assembly references a .NET 4 assembly, even though the project is set to the .NET 3.5 (full) profile.

我有原建于.NET 4的解决方案,使用Visual Studio 2010中所需的组件(System.ServiceProcess; System.Configuration.Install)只与.NET 4客户端配置文件的功能。测试项目仅可.NET 4中(全)档案,因此是不兼容的。因此,我改变了这两个目标项目和测试项目以.NET 3.5(满)的框架轮廓,因为这些组件被允许在此配置文件。

I have a solution originally built in .NET 4, using Visual Studio 2010. The required assemblies (System.ServiceProcess; System.Configuration.Install) function only with the .NET 4 Client Profile. Test projects may only be .NET 4 (full) Profile, and are therefore incompatible. Therefore, I changed the framework profile of both the target project and the test project to .NET 3.5 (full), since these assemblies are allowed in this profile.

以下是编译器警告:

主要参考   mscorlib.Behaviors,版本= 0.94.0.0,   文化=中立,   公钥= 31bf3856ad364e35,   的ProcessorArchitecture = MSIL不能   得到解决,因为它有一个间接   依赖于.NET框架   集结号mscorlib程序,版本= 4.0.0.0,   文化=中立,   公钥= b77a5c561934e089这   具有更高版本4.0.0.0比   在当前的版本2.0.0.0   目标框架。

The primary reference "mscorlib.Behaviors, Version=0.94.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.

是否有某种方式来强制摩尔坚持.NET 3.5,而无需端口的应用程序到Visual Studio 2008?我真的,真的不希望这样做。

Is there some way to force Moles to stick to .NET 3.5, without having to port the application to Visual Studio 2008? I really, REALLY don't want to do that.

我相信这是同一个问题:<一href="http://stackoverflow.com/questions/7096814/am-i-the-only-one-getting-assembly-not-available-in-the-currently-targeted-frame">Am我是唯一一个获得大会不可用在当前的目标框架?

I believe these are the same issue: Am I the only one getting "Assembly Not Available in the Currently Targeted Framework"?

推荐答案

这个问题是部分地被回答<一href="http://stackoverflow.com/questions/7096814/am-i-the-only-one-getting-assembly-not-available-in-the-currently-targeted-fram">Am我是唯一一个获得&QUOT;汇编不可用当前的目标框架和QUOT;?还有残留的问题,具体的解决方案。然而,这并不是新的解决方案的一个问题,因为报告此​​问题

This question is partially answered by Am I the only one getting "Assembly Not Available in the Currently Targeted Framework"? There are still residual issues with specific solutions. However, this has not been a problem with new solutions, since reporting this problem.

这篇关于痣引用.NET 4大会在.NET 3.5的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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