简体   繁体   English

将在64位系统上构建的C#中的应用程序与在32位系统上运行的应用程序匹配

[英]Matching application in C# that built on 64-bit system to running on 32-bit system

我在具有64x位系统的计算机上开发了ac#程序,该程序完美运行,但是当我尝试在32x位系统上运行该程序时,出现错误:“此应用程序无法在您的PC上运行”,我需要更改或添加代码以使其匹配以在32x位系统上运行?

Change the Platform Target in the Visual Studio project settings to Any CPU or x86 . 在Visual Studio项目设置中将Platform Target更改为Any CPUx86

64-bit CPUs can run 32-bit (x86) programs, but the reverse is not true. 64位CPU可以运行32位(x86)程序,但事实并非如此。 Additionally, the Any CPU option allows the jitter on each individual machine to choose the best option for that machine. 此外,“任何CPU”选项允许每台计算机上的抖动为该计算机选择最佳选项。

However, you also need to check through any third-partly libraries in your application. 但是,您还需要检查应用程序中的所有第三方库。 If you took a dependency on a library or reference an assemply (dll) that is compiled for one specific platform, that will limit your options to what is supported by that assembly. 如果您依赖某个库或引用为一个特定平台编译的assemply(dll),那么您的选择将受到该程序集支持的限制。

Finally, make sure the target PC actually has the right version of the .Net Framework installed. 最后,确保目标PC确实安装了正确版本的.Net Framework。

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

相关问题 我可以在32位系统上运行在64位系统上开发的C#应用​​程序吗? - Can I run a C# application developed on a 64-bit system on a 32-bit system? 在 64 位机器上以 32 位方式运行 C# 应用程序 - Running a C# application as 32-bit on a 64-bit machine 32位OpenFileDialog-> 64位System32吗? - 32-bit OpenFileDialog --> 64-bit System32? C# 32 位和 64 位应用程序的单一部署项目 - C# Single Deployment project for 32-bit and 64-bit application 使用Environment.Is64BitProcess从c#应用程序动态调用32位或64位DLL - Dynamically calling 32-bit or 64-bit DLL from c# application using Environment.Is64BitProcess 如何判断我的应用程序是作为32位还是64位应用程序运行? - How do I tell if my application is running as a 32-bit or 64-bit application? 使用32位应用程序中的64位库 - Use 64-bit library from 32-bit application 64位和32位应用程序之间的桥梁 - Bridge between 64-bit and 32-bit application 当完整路径解析为64位目录时,无法从32位C#应用程序启动快捷方式(lnk)文件 - Unable to launch shortcut (lnk) files from 32-bit C# application when the full path resolves to a 64-bit directory 从64位c#WinForms应用程序调用第三方32位dll时的事件处理 - Event handling at calling a third party 32-bit dll from a 64-bit c# WinForms application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM