There is no type or namespace name "ScriptReference" in the Namespace "System.Web.UI" (is the assembly reference missing?)

Source: Internet
Author: User

Website error when upgrading from Framework 3.5 to framework4.0 compilation:

Error 10 the namespace "System.Web.UI" does not exist in the type or namespace name "ScriptReference" (is the assembly reference missing?) c:\Windows\Microsoft.NET\Framework\v4.0.30319 \temporary ASP Files\01.web\582f5aca\78ccecad\app_web_s2pcmnfi.0.cs 521

Solutions to the same phenomenon found on the Internet:

1. http://www.cnblogs.com/dudu/archive/2010/06/24/1764549.html

2. http://blog.csdn.net/hebingyu/article/details/7765900

Found are not good use, so had to study, ASPX file compilation process is the first step to compile into CS file, the second again with CSC compiled into assembly, according to the above error to find the compiled temporary file, C:\Windows\Microsoft.NET\ Framework\v4.0.30319\temporary ASP. Files\01.web\582f5aca\78ccecad\s2pcmnfi.out, When opened, it is found that CSC is using the framework2.0 csc,c:\windows\system32> "C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe"/t : library/utf8output/r: "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP. Files\01.web\582f5aca\ 78ccecad\assembly\dl3\5637b46a\4184c99d_6b04d001\icsharpcode.sharpziplib.dll "...

It seems that this is the reason, try to change the compilation node in the Web. config to <compilation debug= "true" targetframework= "4.0", recompile succeeded.

There is no type or namespace name "ScriptReference" in the Namespace "System.Web.UI" (is the assembly reference missing?)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.