开发者

Primary reference can't be resolved - dlls' that target different versions of .NET

In my solution I have projects A and B. Project A is ta开发者_如何学Gorgeting .NET 4.0. Project B must target .NET 3.5 as it is for Sharepoint 2010. Project B has a reference to Project A. When I compile, I get multiples of the following warning:

The primary reference "projectA.dll" 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. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets

How do I fix it? Thanks!


.Net 4.0 and 3.5 use different versions of the CLR (4 and 2.0, respectively). If it's an option, have project A target .Net 3.5. It's my understanding that MS will eventually introduce .Net 4.0 support for SharePoint but in the interim you may want to stick to 3.5.

http://msdn.microsoft.com/en-us/library/bb822049.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜