Hi,
I'm stuck in this situation: I write code for a x86 on a x64 PC. When I try to run my exe a message says "Not a valid win32 application". Ok, let's configure the platform in the "Project -> Solution Option".
The problem is that in this window I have only displayed the "Debug X86" and "Release X86" configuration relative to the X86 platform. The code run only for X64 machine instead.
How could I solve this situation? I tryed the multitargeting packet by windows for VS but nothing changed.
Posts
I would say you are having another problem. Compiling for x86 works fine on a x64 PC. What type of project are you trying to run and how are you trying to run it?
Hi, I'm compliling the project on a x64 PC but I need to run in on a x86. The project was for a meccanic interface, but I see the issue with the standard "Hello word" in a shell program.
The profile on the IDE says x86, thus I expected to run it on a x64 (my machine) and on a x86 machine (future customers). But on a x86 windows XP machine I've got the problem.
I don't think you understood the question so let's try a different approach. What are all of the references in your project? Is Xamarin.iOS or Xamarin.Mac or monodroid in the list?
You cannot run an app built for iOS, Android, or Mac on a Windows PC.
Hi Adam,
thanks for the reply; here's the code:
using System;
namespace helloworld
{
class MainClass
{
public static void Main (string[] args)
{
Console.WriteLine ("Hello World!");
Console.ReadKey ();
}
}
}
as you can see It's the simple hello world code, the application open a console window, compiled on a x64 machine (Active configuration: Debug | X86). When I open the .exe on a x86 machine the "Not a valid Win32 Application" popup is displayed.
Any ideas?
That code doesn't prove anything. Look at the references in your project. What are your references?
there's only "System" as reference
Could you attach a .zip of your project? (delete all bin and obj directories first)
Here the project...and thanks for the support!
I don't see the problem. I can build either on Mac or Windows using either Xamarin Studio or Visual Studio using either configuration, and in all cases it appears to be a 32-bit .exe, which I tested on both a 32-bit and a 64-bit Windows OS.
On which OS are you testing?
It's an old win XP...today I'll check the machine. Thank you for the support!
XP doesn't support .Net 4.5
Uhm..I was thinking about the framework. So I need to downgrade? There's no backward compatibility?
Thank you so much
Ok I found it! Solved. It's the target framework. Have a nice day