Click here to Skip to main content
15,893,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
in vs2010,I create a dll (AAA.dll) using c++ language,and then it is referenced by my project using c# language.
now problem is : can not load file or assembly 'AAA.dll',or one of its dependency.
if I install the enviroment vs2010,this problem is solved.

why? I have tried so many methods , but failed.

so, please help me.
Posted

1 solution

As you say, "C++", not "C++/CLI", I assume AAA.dll is a native (unmanaged) library, and the problem is most likely in the dependencies of this library.

You can find out the dependency using Dependency Walker, see http://dependencywalker.com/[^].

So, there can be two way of resolving the problem of dependencies:

1) Re-write AAA.dll to eliminate the dependencies — highly recommended but not always possible.

2) Making the software you AAA.dll depends on a prerequisite. The thing is: most likely, your library depends just on VS 2010 libraries.
You course, deployment of the software which depends on VS 2010 cannot be even considered.
Instead, your prerequisites can be Microsoft Visual C++ 2010 Redistributable Package:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84[^].

—SA
 
Share this answer
 
v2
Comments
Olivier Levrey 15-Apr-11 6:20am    
My 5. The Redistributable Package will do it.
Sergey Alexandrovich Kryukov 15-Apr-11 13:10pm    
Thank you, Olivier. Most likely, I would say.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900