I have two projects in a solution. One is a class library with my FTP, GPG and some other classes that get compiled into a dll call CBI.Utilities.
The other is my main app which in a few places call the ftp class. I added the reference to the main solution by browing to the project from references under the main solution and now I get this error when I try to instantiate the ftp class.
"Could not load file or assembly 'CBI.Utilities, Version=1.0.2053.21021, Culture=neutral, PublicKeyToken=78bbe40a91a1660e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"
Should I be making a reference to the DLL or to the projects. Either way I end up with a reference cbi.utilities.
I have built the CBI project first and then added the reference but that did not help.
Thanks.

Error- Could not load file or assembly
daokfella
JUst for future reference:
If you add a reference to a component that was built with an older version of the .NET Runtime then you need to have the version installed in order for your app to run.
The alternative is to rebuild the component using the newer .NET Runtime and this would be the recommended thing to do. After that you should no longer be getting this error.
Cameron McColl
The Wee Scot
Isabel_ve
I would think there would be a menu items or process for upgrading any old references to the new framwork if it saw a reference to an old framework.
Coriolan
I have the same issue... more so than before...
I started a solution (14 projects in all) over a year ago with the First 2.0 Beta... since it has been compiled and re-compiled with the new 2.0 Full Production Release of .NET. If I get the error... I can Re-Build the Solution and that fixes it.... but it is such a pain in the A@@!
And it is happening more and more lately. I just reformatted my entire computer and reloaded the VS Studio and 2.0... still nothing... still get the issue!
Takara
The only reference used by the utilities project is system.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\System.dll
And if I delete \obj directory in the utilities solution and rebuild the project the program runs fine until I pull down the project from sourcesafe again. The utilities project was written in VS 2003 whereas the main project is being written in the beta.
Should opening a project in vs2005 update the assembly to point to the 2.0 framework.
Dennis Vroegop
I am forever dealing the the problem you describe on one of my projects. I note in properties of the reference to the offending dll from the calling project that the "Specific Version" property repeatedly gets set to "True".
No matter how often I set if false when the error occurs I check and it has been set to True again.
I wonder if you have solved your problem and if this helps. Please let me know.
Cheers
Frankie Myat
I would definately try installing the .NET framework 1.1 redistributables to see if that helped.
http://www.microsoft.com/downloads/details.aspx FamilyID=262d25e3-f589-4842-8157-034d1e7cf3a3&displaylang=en
That way you know that all the original 1.1 framework components are present. Framework 1.0, 1.1 and 2.0 can all be residing on the same machine at the same time.
mightypeo
This sounds like a different issues.
Hvae you tried dropping the reference altogether to the offending dll and then adding it again
Add it as a project reference first and see if that works.
Then try a DLL reference. Let me know which if any don't work.
When you add the DLL (file) reference be sure to add the reference from the bin dir of the dll's proect.
If your still stuck, perhaps you could make a simplified zip file of the sln and include it so I can take a look
Ahmed Fawzy Abd Eldayem
Tim Macaulay
Just a question, were all the components of the application - Class Library & Client all created using the same version of the .Net Framework. Was this using VB 2003 or 2005 (Beta)
Some potential scenarios that could be are that the CBI.Utilities assembly is referencing something that doesn't exist on the machine. An example of this may be a reference to a DLL that is not installed - this potentially could be an earlier version of the framework or even a different version of the DLL.
If you load the solution and load up each of the the projects (Class Library and Client) and ensure that all the references used throughout exist as well as change any references that refer to the dll and change them to the project in the solution. When you rebuild the solution it will rebuild each of the components.
This means that you should ensure that all the components are in sync and that all references to those components exist when you build your solution.
Sean X
You saying that the cbi.utilities is a class library that was written in VS2003 and when you pull the project down from sourcesafe it stops working again.
Youve given me a reference to a V2.0.50215 of the .net framework which is the version for the beta of VS2005. So your reference would be to this. Pulling down the sourcesafe copy make be looking for files that are version 1.1 of even .0 of the framework.
when you pull the ode from sourcesafe is the reference to an earlier version of the framework as V2.0.50215 was not around for a VS2003. So I would still be learning towards a a reference in your class library that is not set correctly to a version that is on your machine - such as an component which may be on an earlier version of the framework.
Is V1.1 of the framework installed on this machine as well as V2