.NET 4.0无法解析对System.Web.Extensions程序集的引用 [英] .NET 4.0 Cannot resolve reference to System.Web.Extensions assembly

查看:185
本文介绍了.NET 4.0无法解析对System.Web.Extensions程序集的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试导入System.Web.Script.Serialization,以便可以反序列化JSON,但是在我的Imports语句中,Visual Studio找不到System.Web.Extensions程序集.

I'm trying to import System.Web.Script.Serialization so I can deserialize JSON, but in my Imports statement, Visual Studio can't find the System.Web.Extensions assembly.

在消除此错误之前,我已经确保我没有使用.NET 4.0 Client,并尝试通过引用管理器",属性"窗口,以及将文件直接拖放到Bin中来引用程序集.文件夹,然后尝试引用它.我仍然收到以下错误.

Before you dismiss this, I have already made sure I am not using .NET 4.0 Client, and have tried to reference the assembly through the Reference Manager, through the Properties window, and by dragging and dropping the file directly to the Bin folder, then attempting to reference it. I still get the following error.

我已经检查以确保自己位于.NET 4.0和不是 4.0客户端

I have already checked to make sure I'm in .NET 4.0 and not 4.0 Client

程序集显示在我的参考文件中

And the assembly shows up in my References

它也显示在我的web.config文件中

It also shows up in my web.config file

并在我的文件系统中引用"对话框中显示的相同位置

and in my file system at the same location it shows in the References dialog

当我转到添加引用">程序集">框架"(它面向.NET 4.0)并单击System.Web.Extensions时,该对话框关闭,就好像它已完成操作一样,但是如果我返回进入,它仍然没有被选中.

When I go to "Add Reference" > "Assemblies" > "Framework" (it's targeting .NET 4.0) and click on System.Web.Extensions the dialog closes as if it has completed the action, but if I go back in, it's still not checked.

有什么想法吗?

推荐答案

好的,所以我尝试了一堆东西:重新安装VS2012,删除所有引用并重新添加它们,更改文件的物理位置,但没有任何效果.事实证明,即使VS2012声称无法找到该程序集,它在构建和执行时仍然可以工作.我仍然不确定VS2012为什么不只喜欢该特定程序集,但是在这一点上,我将其排除为一个随机错误,并将其报告给Microsoft.

Okay, so I tried a bunch of stuff: reinstalling VS2012, removing all references and re-adding them, changing the physical location of the file, and nothing worked. As it turns out, even though VS2012 claimed it couldn't find the assembly, it still works when being built and executed. I'm still not sure why VS2012 doesn't like only that particular assembly, but at this point, I'll chock it up to a random error and report it to Microsoft.

这篇关于.NET 4.0无法解析对System.Web.Extensions程序集的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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