Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Could not load file or assembly "

Status
Not open for further replies.

cupcakesrule

Programmer
Feb 6, 2007
35
US
I had a web page that was working, but had the dllls that I was working with replaced so I went through, and removed all of the old tlb files and gacutiled and regasmed the new ones, and am now getting the following error:
Error Type:
DocPrep (0x80070002)
Could not load file or assembly 'DocPrepData, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f87a7eb92f9d10df' or one of its dependencies. The system cannot find the file specified.
/SmartPC/DocPrep0.asp, line 411

I then deleted all of the references in the registry and tried to replace the tlb files again but got the same error. I don't know where to go from here as all of the google searches I have done come back with ASP.NET sites.
 
So you had a page that was working. Then you replaced or removed some dll's and now the page isn't working. You don't say what the error is and where it is happening in your code (are you trying to call one of those dll's?) so we can't offer any assistance that way. The best guess is that something was deleted that you needed and it won't work until you put it back.

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
My apologies for the ambiguity but it errors out on the line where I try and call the wrapper:
Code:
DocSetsXML = DocPrepWrapper.GetFormsList (DocSetIdentifierXML, _
                                            DocDataXML)

This is the name of the DLL: DocPrepWrapper.dll
And this is the tlb file: DocPrepWrapper.tlb

which are located in the same folder as they were previously
 
Were the files removed at some point (that's what I understood from your original post)? Have they been registered or re-registered?

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Yes we have a .bat file that removes the .tlb files then adds the assemblies, then gacutils them and lastly regasms them.
 
Ok, you've got me. Can you elaborate as to what "gacutils" and "regasms" mean?

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Well those two together, gacutil and ragasm, is like registering them with the REGSVR32.EXE, the gacutil adds the assembly to cache, and the regasm registers it.
 
Based on your description of the problem, my best guess is that the page is still looking for the original file for some reason. (My reason for this is that the error message indicates that it cannot find version 1.1.0.0 - the first version before it was replaced?) But if you've properly re-registered it and all, then it shouldn't necessarily be an issue... Sorry, but this may be beyond my ken... :-(

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
SO I noticed it is looking for version 1.1.0.0, and the newest version in my folder is 1.0.1.2. So how do I change which version it is looking for? Shouldn't this be accomplished when I reregister these dlls?
 
Have you tried to manually re-register the file? I'm not sure off the top of my head how to go search for the registry info - and I'm not sure I'd want to even if I knew how off the top of my head.

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top