简体   繁体   English

Visual Studio 2010安装程序项目设置

[英]Visual Studio 2010 Setup Project Settings

I have a solution that contains three projects; 我有一个包含三个项目的解决方案。 UI (winforms), Business Layer and Data Access Layer, and I have created a setup project. UI(winforms),业务层和数据访问层,我已经创建了一个安装项目。 I have added UI project as a primary output, and other two projects (actually dlls) automatically added to application folder and these two projects appears under the Detected Dependencies folder in the solution. 我已经将UI项目添加为主要输出,并且其他两个项目(实际上是dll)自动添加到了应用程序文件夹中,并且这两个项目出现在解决方案中的Detected Dependencies文件夹下。

After building the solution, I have installed the program. 构建解决方案后,我已经安装了程序。 When I run the program, I get the following error: 运行程序时,出现以下错误:
"Could not load file or assembly 'xxxBL', Version = 1.0.0.0 Culture = neutral, PublicKey Token = null or one of its dependencies."
What am I doing wrong? 我究竟做错了什么?

First make sure the dll that failed to load is actually in the search path of your Application. 首先,请确保未能加载的dll实际上在您的应用程序的搜索路径中。 If it is, run the Dependency Walker on the dll that failed to load to see why it failed to load. 如果是这样,请在无法加载的dll上运行Dependency Walker ,以查看其加载失败的原因。 Like the error message says it is possible that one of the dll's dependencies failed to load. 就像错误消息说的那样,dll的依赖项之一可能无法加载。 For instance, a common mistake occurs if you deploy a debug version of your dll. 例如,如果部署dll的调试版本,则会发生常见错误。 It would work on your development machine since it most likely would have whaterver SDK you used already installed, but on a fresh machine it would fail to load because the debug dlls are not installed. 它可以在您的开发计算机上运行,​​因为它很可能已经安装了您使用的Whaterver SDK,但是在新计算机上,由于未安装调试dll,因此无法加载。 The Dependency Walker will allow you to find this sort of problem. Dependency Walker将使您能够发现此类问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM