简体   繁体   English

在VS2012中建立空网站时出错

[英]Error building empty website in VS2012

I am using Visual Studio 2012 Update 3 and whenever I create a new ASP.NET empty website and build it for the first time compilation is successful but I get a server error when accessing the site of "Could not load file or assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The module was expected to contain an assembly manifest." 我正在使用Visual Studio 2012 Update 3,并且每当我创建一个新的ASP.NET空网站并首次成功构建该网站时,编译都将成功,但是访问“无法加载文件或程序集'系统”的网站时出现服务器错误。 Web.Extensions,版本= 4.0.0.0,文化=中性,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。该模块应包含程序集清单。”

If I then go back and build the website again I get a single error of "Object reference not set to an instance of an object" but no line number. 如果再返回并重新构建网站,则会收到一个错误“对象引用未设置为对象实例”,但没有行号。

This error occurs whichever framework I am targeting and whether I am using C# or VB. 无论我针对的是哪个框架,以及我使用的是C#还是VB,都会发生此错误。

Can anyone point me in the right direction please? 谁能指出我正确的方向?

Thanks, Richard. 谢谢,理查德。

Possibly AjaxControl Toolkit is the issue. 问题可能是AjaxControl Toolkit。

Depending on your Framework version( 4.5, 4.0, 3.5 ),, install the correct version of AjaxControl Toolkit from here: http://ajaxcontroltoolkit.codeplex.com/releases/view/94873 . 根据您的Framework版本(4.5、4.0、3.5),从此处安装正确版本的AjaxControl Toolkit: http : //ajaxcontroltoolkit.codeplex.com/releases/view/94873

Another solution I found is to place System.Web.Extensions.dll and System.Web.Extensions.Design.dll directly in the Bin folder of your web application. 我发现的另一个解决方案是将System.Web.Extensions.dll和System.Web.Extensions.Design.dll直接放置在Web应用程序的Bin文件夹中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM