简体   繁体   中英

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."

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.

Can anyone point me in the right direction please?

Thanks, Richard.

Possibly AjaxControl Toolkit is the issue.

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 .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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