只安装frameworke4.0,程序无法运行 [英] only install frameworke4.0, programe can not run

查看:65
本文介绍了只安装frameworke4.0,程序无法运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在vs2010中,我使用c ++语言创建了一个dll(AAA.dll),然后由我的项目使用c#语言对其进行了引用.
现在的问题是:无法加载文件或程序集"AAA.dll"或其依赖项之一.
如果我安装了环境vs2010,则此问题已解决.

为什么?我尝试了很多方法,但都失败了.

所以,请帮助我.

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.

推荐答案

正如您所说的,"C ++"而不是"C ++/CLI",我假设AAA.dll是本机(非托管)库,问题很可能出在该库的依赖项中.

您可以使用Dependency Walker来找到依赖关系,请参见 http://dependencywalker.com/ [ http://www.microsoft.com/downloads/zh-CN/details.aspx?FamilyID = a7b7a05e-6de6-4d3a-a423-37bf0912db84 [
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


这篇关于只安装frameworke4.0,程序无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆