System.Web.Extensions程序组件无法解析

编程入门 行业动态 更新时间:2024-10-20 20:44:43
本文介绍了System.Web.Extensions程序组件无法解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我尝试运行.NET 4.0控制台应用程序,它引用一个妹妹库项目(Bar.dll),它本身引用System.Web.Extensions程序在VS2010 B2。目前我只关心在获得 System.Web.Scripting.JavaScriptSerializer 。

这两个项目都引用System.Web.Extensions程序(使用应用程序引用对话框的.NET中列出的),但是当我尝试编译/运行应用程序时,编译器皮:

C:\ WINDOWS \ Microsoft.NET \框架\ v4.0.21006 \ Microsoft.Common.targets(1291,9): 警告MSB3253:引用的程序集Bar.dll无法得到解决,因为它有一个依赖 System.Web.Extensions程序,版本= 4.0.0.0,文化=中性公钥= 31bf3856ad364e35 这是不是在当前目标框架.NETFramework,版本= V4.0,外形=客户。

真的吗?这是怎么回事?为什么不与大会的编译器链接?

解决方案

当前目标框架.NETFramework,版本= V4.0,外形=客户。                                                          ^^^^^^^^^^^^^^

您所定位的客户端配置文件,其中不包括网络组件。走进项目>属性>应用程序并更改目标框架为.NET Framework 4的。

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. I am currently only interested in getting access to 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:

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. Go into Project > Properties > Application and change Target Framework to ".NET Framework 4".

更多推荐

System.Web.Extensions程序组件无法解析

本文发布于:2023-11-14 15:06:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1587698.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:组件   程序   System   Web   Extensions

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!