Reputation: 7903
I have created a WPF Windows Application project based on the existing standards in the solution. The project properties had Platform Target
as Any CPU
and says 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.
My question is what is happening when I say Prefer 32-bit
? I expect it to launch it as a 32 bit application on a 64-bit machine. 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. Any CPU
makes it a 64-bit build. The application launches only in 64-bit mode and when launched with 32-bit
mode it terminates without any exception.
Upvotes: 1
Views: 116
Reputation: 7903
After trial and error found out that problem is with the length of the AssemblyName
. It was 56 character long after I reduced it to say 36 character it worked fine. Could not get information on whats the permissible limit for 32-bit assembly name and 64-bit assembly name. But 64 bit allows bigger names which has caused the confusion.
Upvotes: 1