星期一, 8月 01, 2005

[.Net]Warning when new web solution

之前安裝 Visual Studio.Net 的時候,沒照步驟來,裝完 Visual Studio.Net 之後,才去安裝 IIS.
這樣當然,Visual Studio.Net 還是可以用,但是在新增 Web solution 的時候,老是會出現這個錯誤訊息.
The class file 'WebForm1.aspx.cs' specified as the codebehind for 'WebForm1.aspx' could not be loaded.
Make sure that the codebehind attribute in the page or control directive properly references an existing code behind file.


網路上可以找到不少關於此問題的描述,但是卻沒有 solution.
找了好久好久,終於找到方法了...

請參考這篇討論:VS.Net Architect - no editor available for aspx files
簡單的說,就是移除掉 Visual Studio.Net,.Net framework以及必要的 registry 與殘存的檔案,再重新安裝.
1. HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.0
2. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0
3. HKEY_Local_Machine\Software\Microsoft\.NetFramework
4. HKEY_Local_Machine\Software\Microsoft\Net Framework Setup
5. The installation directory for VS.NET.
6. .\Documents and Settings\[USERNAME]\Local Settings\Application Data\Microsoft\VisualStudio
7. .\Documents and Settings\[USERNAME]\Application Data\Microsoft\VisualStudio
8. c:\program files\microsoft visual studio .Net
9. C:\windows or winnt\Microsoft.Net
Search for and delete all instances of mscoree.dll

但我只有移除掉 Visual Studio.Net,然後移除掉必要的 registry 與殘存的檔案,.
1. HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.0
2. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0
3. The installation directory for VS.NET.
4. .\Documents and Settings\[USERNAME]\Local Settings\Application Data\Microsoft\VisualStudio
5. .\Documents and Settings\[USERNAME]\Application Data\Microsoft\VisualStudio
6. c:\program files\microsoft visual studio .Net

重新安裝之後就 ok 啦~

真的是花了不少功夫.

When I installed Visual Studio.Net, I don't follow the correct instrution. I installed IIS after Visual Studio.Net installation.
Of course, Visual Studio.Net still worked, but there are some messages when you try to new a web solution:
The class file 'WebForm1.aspx.cs' specified as the codebehind for 'WebForm1.aspx' could not be loaded.
Make sure that the codebehind attribute in the page or control directive properly references an existing code behind file.


You can find some articles about this question, but no articles provide real solutions.
I spend lots of time, finally I got the solution.

Please refer this discussion:VS.Net Architect - no editor available for aspx files
I try to summary the conclution below:
1. Remove visual studio.net and .Net framework.
2. Remove necessary registry and unremoved files.
1. HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.0
2. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0
3. HKEY_Local_Machine\Software\Microsoft\.NetFramework
4. HKEY_Local_Machine\Software\Microsoft\Net Framework Setup
5. The installation directory for VS.NET.
6. .\Documents and Settings\[USERNAME]\Local Settings\Application Data\Microsoft\VisualStudio
7. .\Documents and Settings\[USERNAME]\Application Data\Microsoft\VisualStudio
8. c:\program files\microsoft visual studio .Net
9. C:\windows or winnt\Microsoft.Net
Search for and delete all instances of mscoree.dll

3. Reinstall.

But I only do these steps:
1. Remove Visual Studio.Net.
2. Remove necessary registry and unremoved files.
1. HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.0
2. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0
3. The installation directory for VS.NET.
4. .\Documents and Settings\[USERNAME]\Local Settings\Application Data\Microsoft\VisualStudio
5. .\Documents and Settings\[USERNAME]\Application Data\Microsoft\VisualStudio
6. c:\program files\microsoft visual studio .Net

3. Reinstall.

And everything seems fine now. :)

沒有留言:

您或許對這些文章有興趣

Related Posts Plugin for WordPress, Blogger...