Bug 15898 - Build fails if solution contains multiple platforms
Summary: Build fails if solution contains multiple platforms
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C Binding ()
Version: 4.1.7
Hardware: PC Linux
: Normal normal
Target Milestone: 4.2.3 (from master)
Assignee: Bugzilla
Depends on:
Reported: 2013-11-04 07:36 UTC by Manu
Modified: 2014-01-15 07:49 UTC (History)
3 users (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 Manu 2013-11-04 07:36:03 UTC
My solution contains multiple platforms, which causes the build to fail with the error:
  Build failed. x86 IO returned 25. Path: /mnt/Work/Projects/Fuji/.prec/Debug|x86

I suspect the problem is that the '|' pipe used in the Config|Platform pair produces an invalid path.
If there is only one platform, it seems to have special handling where it appears as "Any CPU" in the sln, and "AnyCPU" in the project, and then it doesn't seem to include the pipe and all works as expected.

Eg, my .sln contains lines like this:
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Native = Debug|Native

	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{9F6DD639-0B4D-55D5-1465-E0AB80C3BB36}.Debug|Native.ActiveCfg = Debug|Native
		{9F6DD639-0B4D-55D5-1465-E0AB80C3BB36}.Debug|Native.Build.0 = Debug|Native

My .cproj contains lines like this:
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Native' ">
Comment 1 Mikayla Hutchinson [MSFT] 2013-11-07 20:53:40 UTC
Fixed in master.
Comment 2 Mohit Kheterpal 2014-01-15 05:33:57 UTC
We have tried to verify this issue. But we are not sure about the steps.

Could you please provide us some steps or sample application so that we can verify this issue?
Comment 3 Manu 2014-01-15 07:49:37 UTC
Ummm, well as a result of this issue (and others) I gave up on Linux and switched back to Windows full-time :/

I'll see if I can reproduce it with monodevelop under Windows. Otherwise I'll need to reinstall Linux to reproduce it again I guess :/

But basically, my files looked like that above.
It seems there is some sort of special handling for projects using the platform "Any CPU" in the sln, and "AnyCPU" in the project files (these must be hard-coded expectations, since they don't even match). It seems to ignore the concept of platform when it encounters those platform strings.
If you actually specify platforms, I encountered lots of problems.

Just make some project files with multiple platforms and see what happens?

I'll try and produce actual project files for for you if I can get it working in Windows.

Why is this marked as resolved? Has it been fixed?
Are you just trying to verify the fix?