orgrau9
asked on
Could not load file or assembly ... error VB.NET
I am migrating my Visual Studio dev environment to a new PC and getting an error when building a solution:
Could not load file or assembly <file> or one of its dependencies
The dll is there, in a right path. I don't see any warnings about missing references. So, I tried to check dependencies of that dll with .NET Reflector. It gives me a list of all references - how can I check which ones are missing?
Is there other way to check what dependencies are missing?
That application works perfectly fine on all other machines.
Thanks
Could not load file or assembly <file> or one of its dependencies
The dll is there, in a right path. I don't see any warnings about missing references. So, I tried to check dependencies of that dll with .NET Reflector. It gives me a list of all references - how can I check which ones are missing?
Is there other way to check what dependencies are missing?
That application works perfectly fine on all other machines.
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Seems like it the machine it will not run on has a different .NET version (if you have all your references and DLLs installed).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I tried to remove all references and adding again, but it didn't help. It is not about the references from VS, but dependencies of that DLL.
.NET version is exactly the same as on other PCs.
How can I check all its dependencies and make sure they have a right versions?
.NET version is exactly the same as on other PCs.
How can I check all its dependencies and make sure they have a right versions?
need to know more about the dll and its dependencies to understand your problem
ASKER
it is a 32-bit dll with the following dependencies:
mscorlib
System
System.Configuration
System.Drawing
System.Web
System.Web.Services
System.Windows.Forms
System.XML
I have .NET:
.NET Compact 2.0 SP2
.NET Compact 3.5
.NET 4 Client
I don't have IIS installed (none on other computers). are there any settings to enable 32-bit app pool? I know there are some settings in IIS.
mscorlib
System
System.Configuration
System.Drawing
System.Web
System.Web.Services
System.Windows.Forms
System.XML
I have .NET:
.NET Compact 2.0 SP2
.NET Compact 3.5
.NET 4 Client
I don't have IIS installed (none on other computers). are there any settings to enable 32-bit app pool? I know there are some settings in IIS.
Are you using VS or the express versions?
You may have to change your program to an x86 rather than an x64
You may have to change your program to an x86 rather than an x64
ASKER
I have VS. There is no point to change to x86, because the application runs perfectly fine on other Win 7 64 PCs. It is the problem with only one new computer running fresh Win 7 installation.
To me it looks as either some assemblies are missing or settings to run 32 bit on 64.
BTW, even changing to x86 makes no difference. Tried it already.
To me it looks as either some assemblies are missing or settings to run 32 bit on 64.
BTW, even changing to x86 makes no difference. Tried it already.
OK, back to the basics.
1. You say the dll is there in the right path, what is the right path? Is that in the same folder as your executable?
2. Did you write this dll (i.e have the source code) or is it a third party dll? If it is a third party dll, what are the dll's references if you can get them?
3. Could you please post the entire error message as you get it? This seems like a simple error to resolve, however, we seem to be going round in circles and you probably have missed something obvious in the error message.
1. You say the dll is there in the right path, what is the right path? Is that in the same folder as your executable?
2. Did you write this dll (i.e have the source code) or is it a third party dll? If it is a third party dll, what are the dll's references if you can get them?
3. Could you please post the entire error message as you get it? This seems like a simple error to resolve, however, we seem to be going round in circles and you probably have missed something obvious in the error message.
You only have .NET 4 Client Profile and I think System.Web is not included in that. If both your app and the DLL are .NET 4 then try installing the full framework. Otherwise check the framework version the DLL is targeted at.
Yes CC is right...
Please try installing full .net framework 4.0
Please try installing full .net framework 4.0
ASKER
My application targets .NET 3.5. Anyway, to make sure, I installed the same .NET frameworks as on another Win 7 64 machine, where it works OK:
Now I have:
.NET Compact 2.0 SP2
.NET Compact 3.5
.NET 4 Client
.NET 1.1
.NET 4 extended
it didn't help - exactly the same problem.
Now I have:
.NET Compact 2.0 SP2
.NET Compact 3.5
.NET 4 Client
.NET 1.1
.NET 4 extended
it didn't help - exactly the same problem.
ASKER
I have found the reason. The error was fixed when I deleted and added the reference to that 3rd party DLL.