Bug 20933 - xF.Android solution fails to build on windows due to missing System.Data
Summary: xF.Android solution fails to build on windows due to missing System.Data
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2014-06-26 20:57 UTC by Peter Collins
Modified: 2014-09-30 11:04 UTC (History)
3 users (show)

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

diagnostic build output (3.27 MB, application/octet-stream)
2014-06-26 20:57 UTC, Peter Collins

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:

Description Peter Collins 2014-06-26 20:57:46 UTC
Created attachment 7210 [details]
diagnostic build output

This solution (found in bug #20496) is again building successfully on 4.14-series on Mac OSX, however this solution does fail to build on windows. This is _NOT_ a regression from the current stable XA 4.12.5.

(CoreCompile target) ->
  GlobalApplication.cs(32,4): error CS0012: The type 'System.Data.Common.DbConn
ection' is defined in an assembly that is not referenced. You must add a refere
nce to assembly 'System.Data, Version=, Culture=neutral, PublicKeyToken=
b77a5c561934e089'. [C:\Users\PJ Collins\GitRepos\QualityAssurance\Samples\andro

The solution does build successfully if I manually add this reference, but there are no modifications needed for this to build successfully on OSX. I'm wondering why adding a reference to System.Data is requiredto build this solution on windows but not mac. I've attached the diagnostic output from windows

Windows 7x64
XA 4.14/b5c14449d5e8
Comment 1 Jonathan Pryor 2014-06-26 21:24:55 UTC
This could also be an xbuild bug ("it should follow MSBuild behavior!") or an xbuild feature ("why shouldn't it behave this way?"), or it's a .NET-version dependent bug (I have no idea what build environment the original customer used to build this project).

In any event, I'm not entirely sure this is an XA issue...
Comment 2 Marek Safar 2014-06-27 03:29:37 UTC
It's most likely either xbuild (if the compiler arguments are same as msbuild) or mcs. Assuming System.Data, Version= is provided by XA
Comment 3 Jonathan Pryor 2014-06-27 14:04:23 UTC
@Marek: Yes, Xamarin.Android (and Xamarin.iOS) provide System.Data.dll. (It's used by Mono.Data.Sqlite.dll.)
Comment 4 Marek Safar 2014-08-16 08:49:49 UTC
Fixed in master
Comment 5 Peter Collins 2014-09-24 17:28:15 UTC
This build error is now occurring on mac as well, using mono 3.10. This is a regression from mono 3.8-series.

OSX Mavericks
Mono 3.10-series / ((detached/ac51002 Wed Sep 17 18:34:00 EDT 2014)
XA 4.18 / 04399d62c
Comment 6 Marek Safar 2014-09-25 03:25:54 UTC
Solution fails to build on Windows (.net) and Mono not sure why it's marked as regression
Comment 7 Peter Collins 2014-09-25 12:04:10 UTC
Perhaps I should have filed a new bug for this behavior, but it is the same error. This solution is now failing to build on Mac OSX after installing mono 3.10. This behavior is a regression from desktop mono 3.8 on Mac OSX.
Comment 8 Peter Collins 2014-09-29 12:49:26 UTC
To avoid further confusion, I'll separate this out into two bugs as I should have done in the first place. Please ignore Comments #5-7 as they are no longer valid for this bug, they have been refiled as bug #23455.

This issue has been occurring in XA since at least 4.12.3-3, in fact, I'm not sure it ever successfully built on windows.

This is still an issue in XVS 3.7 (XA 4.18-series). When should we be expecting to see the fix from comment #4?
Comment 9 Peter Collins 2014-09-30 10:57:07 UTC
The project will need to be updated to include a missing reference.