简体   繁体   English

Visual C#Express:在64位上构建,在32位上部署?

[英]Visual C# Express : Build on 64 bit, deploy on 32 bit?

Using Visual C# Express On a 64 bit system (OS and machine): 在64位系统(操作系统和计算机)上使用Visual C#Express:

I am able to set the target build platform to 32 bit platform and build my application. 我能够将目标构建平台设置为32位平台并构建我的应用程序。 It runs fine on the 64 bit system. 它在64位系统上运行良好。 However when I run the same executable on the 32 bit system I get an error of the form "Unhandled Exception: System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)" 但是,当我在32位系统上运行相同的可执行文件时,出现以下错误:“未处理的异常:System.IO.FileNotFoundException:找不到指定的模块。(来自HRESULT的异常:0x8007007E)”

In general is this expected to not work, or do I have a dependency problem as the error implies? 总的来说,这是行不通的,还是我有一个依赖问题,如错误所示?

Thanks, 谢谢,

RM R M

Should work. 应该管用。 But seems that your app is missing a DLL. 但似乎您的应用程序缺少DLL。 Check your app with DependencyWalker on the target machine. 在目标计算机上使用DependencyWalker检查您的应用程序。

Sounds like you have a library which is not 32bit. 听起来您的图书馆不是32位的。 The missing library has already been covered by the other posters, so I will say that you have a library which is a 64bit only library and when the type loader is checking to make sure it matches the signature is wrong and hence its not getting loaded. 缺少的库已经被其他发布者覆盖,因此我想说您有一个仅64位的库,并且当类型加载器正在检查以确保它与签名匹配时是错误的,因此不会被加载。

If you could post a sample project (hello world) that exhibits the same problem (without importing 3rd party libraries) we might be able to troubleshoot further. 如果您可以发布一个示例项目(您好,世界),但该示例项目也存在相同的问题(而无需导入第三方库),我们也许可以进行进一步的故障排除。

In your build project, make sure all libraries being built are 32bit and make sure that you are moving them all to the target machine. 在构建项目中,确保所有正在构建的库都是32位的,并确保将它们全部移至目标计算机。 I prefer to wipe out the target directory and then place the files in, rather than overwrite. 我更喜欢擦除目标目录,然后将文件放入其中,而不是覆盖。

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

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