Bug 53400 - xbuild fails to build when specifying Platform and Configuration.
Summary: xbuild fails to build when specifying Platform and Configuration.
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: 4.8.0 (C9)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-03-16 15:33 UTC by Daniel
Modified: 2018-03-15 10:39 UTC (History)
2 users (show)

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


Attachments
Test Project to demonstrate error. (53.22 KB, application/zip)
2017-03-16 15:33 UTC, Daniel
Details


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 GitHub or Developer Community 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 NOT_ON_ROADMAP

Description Daniel 2017-03-16 15:33:37 UTC
Created attachment 20381 [details]
Test Project to demonstrate error.

When using xbuild to compile my project I get an error stating there is an issue with my OutputPath.
This occurs both with my existing project and a new project that I have created with Xamarin Studio.

The compilation succeeds if the platform variable (/p:Platform=iPhone) is left unspecified.

How I'm Compiling:
/Library/Frameworks/Mono.framework/Versions/Current/Commands/xbuild iOS/Test.iOS.csproj /p:Configuration=Release /p:Platform=iPhone /p:BuildIpa=true

Output:
	Target ResolveProjectReferences:
		Project "/Users/username/Projects/Test/Test/Test.csproj" (default target(s)):
			Target _CheckForInvalidConfigurationAndPlatform:
/Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: error : 'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: Release Platform: iPhone.
			Task "Error" execution -- FAILED
			Done building target "_CheckForInvalidConfigurationAndPlatform" in project "/Users/username/Projects/Test/Test/Test.csproj".-- FAILED
		Done building project "/Users/username/Projects/Test/Test/Test.csproj".-- FAILED
	Task "MSBuild" execution -- FAILED
	Done building target "ResolveProjectReferences" in project "/Users/username/Projects/Test/iOS/Test.iOS.csproj".-- FAILED
Done building project "/Users/username/Projects/Test/iOS/Test.iOS.csproj".-- FAILED


Environment Info:
=== Xamarin Studio Enterprise ===

Version 6.2 (build 1829)
Installation UUID: b0eb37d1-cfb0-4d31-a1d5-a8d96042f24a
Runtime:
	Mono 4.8.0 (mono-4.8.0-branch/8f6d0f6) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 408000520

=== NuGet ===

Version: 3.5.0.0

=== Xamarin.Profiler ===

Version: 1.2.1
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 8.2.1 (11766.1)
Build 8C1002

=== Xamarin.iOS ===

Version: 10.4.0.128 (Visual Studio Enterprise)
Hash: ba11e48
Branch: cycle9
Build date: 2017-03-10 08:48:04-0500

=== Xamarin.Android ===

Version: 7.1.0.43 (Visual Studio Enterprise)
Android SDK: /Users/username/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		5.0 (API level 21)
		5.1 (API level 22)
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.3
SDK Build Tools Version: 25.0.2

Java SDK: /usr
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Not Installed

=== Xamarin.Mac ===

Version: 3.0.0.398 (Visual Studio Enterprise)

=== Xamarin Inspector ===

Version: 1.1.2.0
Hash: cdc01b9
Branch: 1.1-release
Build date: Wed, 22 Feb 2017 23:24:11 GMT

=== Build Information ===

Release ID: 602001829
Git revision: 3a28108feb03a6384702c96ffc8c548121cdf37c
Build date: 2017-03-12 06:55:23-04
Xamarin addins: 295d27f8dcdde049a1807a76c888fc0a6557357d
Build lane: monodevelop-lion-cycle9

=== Operating System ===

Mac OS X 10.11.6
Darwin MacBook-Pro.local 15.6.0 Darwin Kernel Version 15.6.0
    Mon Jan  9 23:07:29 PST 2017
    root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

NuGet Package Management Extensions 0.12
Comment 1 Mark 2017-04-06 18:59:00 UTC
I am getting the same error with my VSO CI Build (MacInCloud)

Build Config version:
==============================================================================
2017-04-06T18:49:02.4590990Z Task         : Xamarin.iOS
2017-04-06T18:49:02.4607450Z Description  : Build an iOS app with Xamarin on macOS
2017-04-06T18:49:02.4623310Z Version      : 1.113.0
2017-04-06T18:49:02.4645990Z Author       : Microsoft Corporation
2017-04-06T18:49:02.4667700Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613729)
2017-04-06T18:49:02.4687100Z ==============================================================================

Mono version: 4.8.0
MacInCloud Agent Version: 2.111.1

Error:
==============================================================================
2017-04-06T18:49:04.8708570Z /Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets (_CheckForInvalidConfigurationAndPlatform target) ->
2017-04-06T18:49:04.8721200Z 
2017-04-06T18:49:04.8738090Z 	/Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: error : 'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: Release Platform: iPhone.
2017-04-06T18:49:04.8746530Z 
2017-04-06T18:49:04.8760690Z 	 0 Warning(s)
2017-04-06T18:49:04.8776960Z 	 1 Error(s)
2017-04-06T18:49:04.8784650Z 
==============================================================================
Comment 2 Mark 2017-04-06 19:04:25 UTC
This is the extract from the Project Property Group:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
    <Optimize>true</Optimize>
    <OutputPath>bin\iPhone\Release</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <ConsolePause>false</ConsolePause>
</PropertyGroup>
Comment 3 Mark 2017-04-06 19:50:51 UTC
Attempted to build with Local Build Agent from VSO and got the same issue.

=== Xamarin Studio Community ===

Version 6.2 (build 1829)
Installation UUID: 62d631b0-70b1-4eeb-a07f-58c4696923ba
Runtime:
	Mono 4.8.0 (mono-4.8.0-branch/e4a3cf3) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 408000495

=== NuGet ===

Version: 3.5.0.0

=== Xamarin.Profiler ===

Version: 0.30.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 8.2.1 (11766.1)
Build 8C1002

=== Xamarin.iOS ===

Version: 10.4.0.128 (Xamarin Studio Community)
Hash: ba11e48
Branch: cycle9
Build date: 2017-03-10 08:48:04-0500

=== Xamarin.Android ===

Version: 7.1.0.43 (Xamarin Studio Community)
Android SDK: /Library/android-sdk-macosx
	Supported Android versions:
		4.4 (API level 19)
		5.0 (API level 21)
		5.1 (API level 22)
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.3
SDK Build Tools Version: 25.0.2

Java SDK: /usr
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 3.0.0.398 (Xamarin Studio Community)

=== Xamarin Inspector ===

Not Installed

=== Build Information ===

Release ID: 602001829
Git revision: 3a28108feb03a6384702c96ffc8c548121cdf37c
Build date: 2017-03-12 06:55:23-04
Xamarin addins: 295d27f8dcdde049a1807a76c888fc0a6557357d
Build lane: monodevelop-lion-cycle9

=== Operating System ===

Mac OS X 10.11.6
Darwin local 15.6.0 Darwin Kernel Version 15.6.0
    Mon Jan  9 23:07:29 PST 2017
    root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64
Comment 4 Marek Safar 2018-03-15 10:39:57 UTC
We deprecated xbuild and recommend using msbuild instead. Switching to msbuild will also most likely resolve the issue you reported.