Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 for Bug 27791 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
When trying to build and create an APK from the command line with xbuild the build fails. The project references a project that does not have the same configuration.
**Steps to Reproduce:**
Download this sample: https://www.dropbox.com/s/e2vn0rrwgh6txis/Phoneword.zip?dl=0
1. Run this command in Terminal
> xbuild Phoneword_Droid/Phoneword_Droid.csproj /p:Configuration=Live /p:Platform=Android /t:PackageForAndroid
An error message when building:
/Library/Frameworks/Mono.framework/Versions/3.12.1/lib/mono/4.5/Microsoft.Common.targets: error : 'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: Live Platform: Android.
Build the project and create an APK
**Build Date & Platform:**
MSBuild may require any referenced projects to have the _same_ configurations. Building the solution file instead of the project file is probably the solution for that, which uses the solution mappings. However, this means you can't add a target for PackageForAndroid or SignAndroidPackage, etc. The following does not work:
xbuild Project.sln /p:Configuration=Live /t:ProjectName:PackageForAndroid
That seems to be the correct syntax stated here: https://msdn.microsoft.com/en-us/library/ms171486.aspx
Xamarin Studio does build the solution and project fine, so it seems possible using xbuild, but I could not figure out how XS is doing this.
We are getting same error while running the command from terminal.
Terminal output: https://gist.github.com/sunil360/e9319918ba9e401c06d7
XS 5.9 (build 388)
Same here. The only workaround I have found is to add the configuration in question to the referenced project, which is annoying because, as you mention, Xamarin Studio builds it just fine. Can we get an update on whether there are any plans to improve this? I agree that the proper solution seems to be to allow building the solution instead.
I don't think this is a Xamarin.Android issue per say. It looks more like an xbuild bug. Reassigning