Bug 2488 - Cant execute when compiled Multiple projects.
Summary: Cant execute when compiled Multiple projects.
Status: RESOLVED INVALID
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-12-13 18:20 UTC by pedrohex
Modified: 2011-12-16 05:36 UTC (History)
2 users (show)

Tags:
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:
Status:
RESOLVED INVALID

Description pedrohex 2011-12-13 18:20:19 UTC
Fails to execute in Windows 64bit(only!I know is not supported but...) a compiled executable from a solution with multiple projects.

Create a Library with a testClass.cs 
Reference it in a new GTKSharp Application project (same solution)
Compile manual or with mono-develop

Linux x86_64 - Runs Ok.
Mac - Runs Ok.
Win32 - Runs Ok.
Win64 - (7 all platforms tested) - fails to execute!
Comment 1 Marek Safar 2011-12-14 03:35:10 UTC
What does fail to execute and how can I reproduce it ?
Comment 2 pedrohex 2011-12-14 07:20:41 UTC
Environment Windows 7 (tested in all platforms) 64-bit.
MonoDevelop 2.8.4.2
Mono 2.10.6

1- Open monodevelop > New Solution.
2- Create a Library Project, name it bug.Test
3- Add a new GTK Project to solution and name it bug.Uiform
4- Set bug.Uiform as startup project
5- Build it , go to project folder/bin/debug and try to execute the executable.

Windows Generic Error : "application stopped working"

Thanks.
Comment 3 Marek Safar 2011-12-14 09:17:54 UTC
.
Comment 4 Mikayla Hutchinson [MSFT] 2011-12-15 02:04:49 UTC
This is most likely because there is no GTK# for the 64-bit MS CLR.

New executable projects created in MD are set to target the x86 runtime (VS does the same). This means that on .NET they run on the 32-bit CLR (Mono ignores the flag). Was your project somehow created without this setting, or did you unset it? Or maybe you set the configuration to Debug}AnyCPU instead of Debug|x86?
Comment 5 Mikayla Hutchinson [MSFT] 2011-12-15 02:05:42 UTC
In the latter case I'd say this is a consequence of the usability problems in our solution configuration management.
Comment 6 pedrohex 2011-12-15 06:12:57 UTC
Tryed multi configuration in compiler options but still the same problem.
Win64 only. Where can i set the 32-bit CLR flag to be ignored ?
Comment 7 Mikayla Hutchinson [MSFT] 2011-12-15 17:25:11 UTC
The setting is in compiler options: http://screencast.com/t/izkFXaQ2Ql1g

For GTK# projects, that *must* be set to x86. It doesn't affect Mac or Linux, but enables the binaries to run correctly on x64 Windows by forcing the 32-bit .NET runtime when running on the x64 OS.
Comment 8 pedrohex 2011-12-16 05:36:57 UTC
That solved the problem. Thank you.