简体   繁体   English

应用程序不是在x86构建上启动,而是在64位上启动

[英]Application not launching on x86 build but launching on 64-bit

I have created a WPF Windows Application project based on the existing standards in the solution. 我已经基于解决方案中的现有标准创建了WPF Windows应用程序项目。 The project properties had Platform Target as Any CPU and says Prefer 32-bit . 项目属性将Platform TargetAny CPU并表示Prefer 32-bit Mine is a 64-bit machine and the application wasn't launching, it took me while to figure out and turned off Prefer 32-bit to launch it. 我的是64位机器,应用程序没有启动,我花了一些时间才弄清楚,然后关闭了Prefer 32-bit来启动它。

My question is what is happening when I say Prefer 32-bit ? 我的问题是当我说“ Prefer 32-bit时发生了什么? I expect it to launch it as a 32 bit application on a 64-bit machine. 我希望它可以在64位计算机上将其作为32位应用程序启动。 But in my case it does not run, it simply terminates. 但就我而言,它没有运行,只是终止了。 Why? 为什么?

Edit: 编辑:

The problem was when I say Prefer 32-bit or x86 it builds the application in 32-bit mode. 问题是当我说Prefer 32-bitx86它以32位模式构建应用程序。 Any CPU makes it a 64-bit build. Any CPU都使其成为64位版本。 The application launches only in 64-bit mode and when launched with 32-bit mode it terminates without any exception. 该应用程序仅在64位模式下启动,而在以32-bit模式启动时,它将毫无例外地终止。

After trial and error found out that problem is with the length of the AssemblyName . 经过反复试验,发现问题出在AssemblyName的长度上。 It was 56 character long after I reduced it to say 36 character it worked fine. 在我将其减少到说36个字符可以正常工作之后,它长了56个字符。 Could not get information on whats the permissible limit for 32-bit assembly name and 64-bit assembly name. 无法获得有关32位程序集名称和64位程序集名称的允许限制的信息。 But 64 bit allows bigger names which has caused the confusion. 但是64位允许更大的名称,这引起了混乱。

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

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