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 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.
There are several incompatibilities between MSBuild and XBuild. Some projects add a check for $(OS) == 'Windows' in their csproj as a mechanism for detecting mono, but this breaks when building on mono/Windows.
A good example is the nuget package restore support which has several such conditions (e.g. http://nuget.codeplex.com/workitem/3435, there are others).
This could be easily solved by having xbuild define a standard environment variable that could be checked from within the csproj. For example, an XBUILD environment variable could contain the version of the XBUILD tool.
Incompatibilities in xbuild are bugs, and likely depend on the *version* of xbuild. They need to be reported and fixed.
Since the bugs are version dependent, simply checking whether it's xbuild isn't really any better than checking for the OS. We don't recommend use of xbuild on Windows, anyway, so checking the OS is an acceptable temporary workaround IMO.