Solved

dll reference in vb 2005

Posted on 2006-07-12
3
233 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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