Banging my head: Could not load type ERROR

  • Thread starter Thread starter darrel
  • Start date Start date
D

darrel

What does that MEAN?

I'm working on a VS project with another person. We keep our DLLs and files
in sync with each other. Last week I hit a snag where i kept getting the
'could not load type' error with one of my usercontrols. The other person
can take my exact same files, compile it into his copy, and it works fine.

So, I deleted everything I had, reimported all of his files, and things were
working again on my localhost.

However, I can not change any of the VB code of the one particular
usercontrol and have VS.net compile it. It seems to ignore my changes and
goes on using the DLL I got from the other person. If I delete said DLL in
hopes of forcing a rebuild, I'm back to getting the 'Could not load type'
error again.

AAAAAARRRRRRRRRRRRRRRRRRRRRRRRGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHH!

Any idea? I've looked online and found that this seems to be a really genric
error and to just keep trying rebuilding/resetting things until it works.
I'm getting nowhere with this.

-Darrel
 
Just checking whether you are both using the same project name?

It is possible that your Inherits attribute is different.

<%@ Control Language="vb" AutoEventWireup="false"
Codebehind="WebUserControl1.ascx.vb" Inherits="p4320work.WebUserControl1"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
 
Your cached copy of your project is probably out of sync with the master
copy. Have you tried (from the Project) menu, "Web Project/Synchronize All
Folders"

If that doesn't work, you may want to delete the files in your cache
(C:\Documents and Settings\profileName\VSWebCache).
 
Just checking whether you are both using the same project name?

Yep. Things have been chuggind along just fine for the most part.
It is possible that your Inherits attribute is different.

Yep...I've checked this and it's OK.

-Darrel
 
If that doesn't work, you may want to delete the files in your cache
(C:\Documents and Settings\profileName\VSWebCache).

Neither of those worked, either.

I guess one question is a chicken/egg thing. Is the 'could not load type'
error causing the DLL not to be compiled, or am I getting that error because
the DLL isn't compiled to begin with?

-Darrel
 
If you can build the project from the build menu successfully, then the
problem is not compiling but loading.
 
If you can build the project from the build menu successfully, then the
problem is not compiling but loading.

A succesful build = a DLL?

I'm not getting a DLL, so would that indicate a build problem? Any idea why
I can't build the project but another person can?

-Darrel
 
darrel said:
A succesful build = a DLL?

Yes, or in .NET terms, an assembly.
I'm not getting a DLL, so would that indicate a build problem? Any idea why
I can't build the project but another person can?

Are you looking in the /bin folder of your project for the assembly?
 
Back
Top