开发者

Could not load assembly

I have a 开发者_JAVA百科normal winforms app. I run it and it calls some logic in another .dll (another project part of the solution). I get an error (my own exception) saying could not load assembly etc etc.

I've used the assembly log viewer but could not find an issue - all I found was that the windows service the program uses was installed/deployed on another account. My winforms app calls this service, which in turn calls logic in its own and different .dlls.

Could this be an issue? Thanks


If you use a FileDialog and open/save/write a file to another directory other than the one that contains your exe/dlls, it will change the programs working directory if you do not set the FileDialog.RestoreDirectory = true. This one caused me fits for a while, and would explain why it appears intermittent.


Check your project .NET Framework version, and your assembly .NET Framework version, problem could be there.

Regards.


Make sure the assembly it's looking for is in the same directory that you're running the application from, or that it's registered in the GAC (Global Assembly Cache) - and that it's the correct version.


Make sure your application and all its dependencies are either all 32 bit or all 64 bit assemblies.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜