Thursday, November 29, 2012

Could not Load Type from Assembly

Error:
Could not load type 'xxxxxx' from assembly 'AssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

This error occurs when trying to open a webpage. The project is built successfully. However, when accessing particular page, the error pops out. The error message is actually quite long. This is only part of the error message.

Solution:
On Visual Studio, go to menu Tools -> Options -> Debugging -> General -> Disable "Enable Just My Code" options.

PS: I am not sure if there is another more feasible solution. This might only be a workaround. There could be side effects. As of now, it is still working fine after this option is disabled.

Update:
Looks like this does not really solve the issue. I find out that if the project or solution is rebuilt, it will go to normal when the web is run. If it doesn't, rebuild, then try it again.

However, when the web is run on debug mode, some pages will get this error, thus not viewable. Another workaround is to view the web in browser (not in debug mode), then attach the process to the web. On Visual Studio, after the web is viewed in browser, go to menu Tools -> Attach to Process -> look for the web server process under which the web is run, e.g. WebDev.WebServer20.EXE
Share:

0 comments:

Post a Comment

About

Related Posts

Cisco VPN not Working on Windows 10

Error: Cisco VPN is not working (cannot login and connect to VPN connection). Solution: 1. Right-click on the VPN client, and Run as Ad...

About Me

My photo
Is an ordinary unNoticed man, with a little knowledge to share and high dreams to achieve. I'd be glad if I can help others, 'coz the only thing for the triumph of evil is for a good man to do nothing. I like English and Chinese language, and know a little about them. Hence, for me, most things can best be expressed in Chinese, some in English, and the rest in others ^^

About Blog

You can find a lot of debugging and deploying problems while developing applications in .NET and Visual Basic here. There are also some querying tips in SQL and typical source codes which might be useful shared here.

Popular Posts

Blogroll

Followers

Follow by Email