Friday, January 18, 2013

asp.net "could not load type" error

Four possible solutions:

  • Most likely cause: .dll is not in the correct \bin folder.
     Check the Project Properties page(Build panel), the \bin folder MUST be located under the website's root folder. There are scenarios -depending on how and when you created your web form- where the \bin folder of the form may not be the same as the \bin folder of the web site.

  • Check the code-behind file and confirm the namespace and the class match the aspx page header. If you cut-n-paste the new page files from an existing page this is usually the case.

  • Clean the project and rebuild it

  • Punt: close VS then restart it, rebuild again and ... keep your fingers crossed

No comments:

Post a Comment