Solved

dll reference in vb 2005

Posted on 2006-07-12
3
235 Views
Last Modified: 2010-04-23
Hi Guys

I have created a solution which is converted from a vb 6 project. This solution consists of several projects.

For some of my forms located in a specific project I get the following exception, this happens when I try to look at the form in the designer:

"Could not load file or assembly 'NodeLib, Version=1.0.2329.20641, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. "

It is accompanied with the exception that pinpoints the code, which is in the part generated by the designer

The project has a reference to another/newer version of the nodelib, namely 1.0.2329.29903.

The nodelib is another project in the solution that we have created.

So it is quite clear what is wrong, namely: that some code references to another version of a dll that the one we have actually built. The things that puzzles me is how/where the reference to the "wrong" dll are created. I wont to track that down. Does anybody have a suggestion to this?

Or better. Have anybody experienced the same problem and the possible solution.

Thanks, Niels



0
Comment
Question by:nielsboldt
  • 2
3 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 17090241
1) In the AssemblyInfo.vb, there is a version element.  By default it uses 1.0.*.  You should change this to a specific number, like 1.0.0.0

2) I believe that this might be a problem because the solution has been fully built yet.

Bob
0
 

Author Comment

by:nielsboldt
ID: 17097967
Hi Bob

That surely helped a lot - just for fun, are there a deeper explanation to this?

Thanks, Niels
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17099010
When assemblies are resolved, the entire version comes into play.  This allows multiple assemblies to have the same name, but different versions, and the application can decide which assembly to load.  An automatic updater application that has a current version, and a new version of a DLL to install is a good example.  When you don't specify the full version, there is an algorithm for generating the rest, and it depends on the time of day.

Bob
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now