Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Could not load file or assembly ... error VB.NET

Posted on 2012-03-20
13
Medium Priority
?
752 Views
Last Modified: 2012-03-21
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
0
Comment
Question by:orgrau9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
  • +2
13 Comments
 
LVL 30

Assisted Solution

by:IanTh
IanTh earned 750 total points
ID: 37741460
you need to go back into visual studio and redo the reference imho
0
 
LVL 17

Expert Comment

by:nepaluz
ID: 37741493
Seems like it the machine it will not run on has a different .NET version (if you have all your references and DLLs installed).
0
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 750 total points
ID: 37741567
Remove the reference and add it again in visual studio.
Also check for right framework version....
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:orgrau9
ID: 37741605
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?
0
 
LVL 20

Expert Comment

by:BuggyCoder
ID: 37741671
need to know more about the dll and its dependencies to understand your problem
0
 

Author Comment

by:orgrau9
ID: 37741713
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.
0
 
LVL 17

Expert Comment

by:nepaluz
ID: 37741771
Are you using VS or the express versions?
You may have to change your program to an x86 rather than an x64
0
 

Author Comment

by:orgrau9
ID: 37741830
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.
0
 
LVL 17

Expert Comment

by:nepaluz
ID: 37741917
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.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37743825
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.
0
 
LVL 20

Expert Comment

by:BuggyCoder
ID: 37743967
Yes CC is right...
Please try installing full .net framework 4.0
0
 

Author Comment

by:orgrau9
ID: 37744672
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.
0
 

Author Comment

by:orgrau9
ID: 37744715
I have found the reason. The error was fixed when I deleted and added the reference to that 3rd party DLL.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

705 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