[英]System.Web.Extensions Assembly cannot be resolved
I am trying to run a .NET 4.0 Console application that references a sister library project (Bar.dll) which itself references System.Web.Extensions in VS2010 B2. 我正在尝试运行引用姐妹库项目(Bar.dll)的.NET 4.0控制台应用程序,该项目本身引用VS2010 B2中的System.Web.Extensions。 I am currently only interested in getting access to System.Web.Scripting.JavaScriptSerializer
. 我目前只对访问System.Web.Scripting.JavaScriptSerializer
感兴趣。
Both projects have references to System.Web.Extensions (using the one listed under ".NET" in the App References dialog), but when I try to compile/run the application, the compiler barks: 这两个项目都引用了System.Web.Extensions(使用App References对话框中“.NET”下面列出的那个),但是当我尝试编译/运行应用程序时,编译器咆哮:
C:\Windows\Microsoft.NET\Framework\v4.0.21006\Microsoft.Common.targets(1291,9): warning MSB3253: The referenced assembly "Bar.dll" could not be resolved because it has a dependency on "System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client".
Seriously? 真的吗? What's going on? 这是怎么回事? Why won't the compiler link with the assembly? 为什么编译器不会与程序集链接?
currently targeted framework ".NETFramework,Version=v4.0,Profile=Client".
^^^^^^^^^^^^^^
You're targeting the Client Profile, which doesn't include the Web assemblies. 您的目标是客户端配置文件,其中不包含Web程序集。 Go into Project > Properties > Application and change Target Framework to ".NET Framework 4". 进入Project> Properties> Application并将Target Framework更改为“.NET Framework 4”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.