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?)