Bug 5057 - Wrong Target CPU when creating GTK# app...
Summary: Wrong Target CPU when creating GTK# app...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 2.8.1
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-05-14 02:53 UTC by Peter Kornfeld
Modified: 2012-05-14 12:44 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Peter Kornfeld 2012-05-14 02:53:47 UTC

When creating a GTK# based solution in MD the Target CPU is x86, even on a 64 bit machine...
I think that it should be Any CPU for all kind of projects (just like in ASP.NET projects) with option to change it later...

(I also checked it on MD 3.0.0 on Windows 7 32 bit - same results)

Comment 1 Mikayla Hutchinson [MSFT] 2012-05-14 12:44:36 UTC
This is by design, to match VS2010. New desktop executable projects are set to an x86 platform target, so they'll use the 32-bit .NET runtime on 64-bit Windows machines. This doesn't affect Mono, since it doesn't not respect the platform flag on CLI binaries.

Libraries and ASP.NET apps are still AnyCPU, to allow them to be loaded into any process. It's only the desktop entrypoint assemblies that are set to x86. And you can easy change it to x64 or ANyCPU.

Since we only ship a 32-bit version of GTK# for Windows, GTK# apps wouldn't run on 64-bit Windows without this.

See also http://blogs.msdn.com/b/rmbyers/archive/2009/06/09/anycpu-exes-are-usually-more-trouble-then-they-re-worth.aspx