提示,以帮助调试和QUOT;无法加载文件或程序集X或它的依赖&QUOT之一; [英] Tips to help debug "Could not load file or assembly X or one of its dependencies"

查看:286
本文介绍了提示,以帮助调试和QUOT;无法加载文件或程序集X或它的依赖&QUOT之一;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找提示/建议/洞察力,以帮助调试应用程序负载的问题; 无法加载文件或程序集 ...

I'm looking for tips/suggestions/insights to help debug an on application load issue; Could not load file or assembly...

该解决方案/项目中,我遇到这个问题是从工作副本在Visual Studio 2008中的Visual Studio 2010的发布候选转换。转换过程似乎是成功的,并且所有的溶液的项目被设置到的框架4

The solution/project where I'm experiencing this issue is a conversion from a working copy in Visual Studio 2008 to the Visual Studio 2010 Release Candidate. The conversion process appeared to be successful, and all the solution projects are set to Framework 4.

唯一的例外是在一个第三方组件(图形处理库),但任何答案可能可能帮助其他有任何麻烦的DLL。

The exception is on a 3rd party component (a graphics processing library), but any answers could possibly help others with any troublesome DLL.

无法加载文件或程序集Aurigma.GraphicsMill.DLL或它的某一个依赖。是不是有效的Win32应用程序。 (从HRESULT异常:0x800700C1)

Could not load file or assembly 'Aurigma.GraphicsMill.DLL' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

什么是混乱的这个例外是附加的文字:是不是有效的Win32应用程序的。

What's confusing about this exception is the additional text: is not a valid Win32 application.

全异常堆栈跟踪是上引擎收录,但似乎并没有阐明这一问题更加轻...

The full exception stack trace is up on PasteBin, but doesn't seem to shed much more light on the issue...

我已经试过到目前为止没有成功:

What I have tried so far with no success:

  1. 简单干净,重建,重新启动Visual Studio的组合2010 RC。
  2. 删除并重新添加有问题的DLL。
  3. 切换有问题的DLL复制本地真假。
  4. 确认,一个成功的构建有问题的DLL出现在bin \ debug文件夹后。
  5. 检查有问题的DLL任何不必要的引用(没有找到)。
  6. 有问题的DLL的相关许可证文件是在同一目录下吧。

我也没有运气与它击中任何断点调试应用程序负载。

I've also had no luck with it hitting any debugger breakpoints on application load.

推荐答案

我已经找到了这个问题的原因进行了,因为你已经切换到.NET V4,你现在使用IIS7新的应用程序池specificially为ASP .NET V4(池本身被称为ASP.NET V4.0')

I have found the cause of this issue to be that because you have switched to .net v4, you are now using a new application pool in IIS7 specificially for asp.net v4 (the pool itself is called 'ASP.NET v4.0')

在应用程序池的高级设置部分,设置启用32位应用程序为真,你的DLL问题将载入预期。

In the advanced settings section of the application pool, set 'Enable 32-bit Applications' to true and your problem DLL will now load as expected.

显然,如果你的web应用程序都有自己的应用程序池,你也应该这样做。

Obviously you should do the same if your web application has its own application pool.

如果您使用的是Windows Server 2008(不R2)看<一href="http://www.guyharwood.co.uk/giving-the-app-pool-identity-folder-permissions-in-iis7-on-windows-server-2008-first-release">this张贴在如何分配你的应用程序池标识正确的权限

If you are using Windows Server 2008 (not R2) see this post on how to assign correct permissions for your application pool identity

这篇关于提示,以帮助调试和QUOT;无法加载文件或程序集X或它的依赖&QUOT之一;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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