Bug 57712 - Could not locate the assembly "System.Data.DataSetExtensions" and "System.Drawing"
Summary: Could not locate the assembly "System.Data.DataSetExtensions" and "System.Dra...
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 10.10 (d15-2)
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2017-06-23 12:34 UTC by Saravanan
Modified: 2017-06-23 17:33 UTC (History)
2 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 Saravanan 2017-06-23 12:34:27 UTC
Included "System.Data.DataSetExtensions" and "System.Drawing" into our project. When we build through MSBuild on Mac, getting following warning/error.

1) /Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Data.DataSetExtensions". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

2) /Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Drawing". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

The assemblies are available on Mac at below path, please let me know the root cause.

MSBuild Command used:
/Library/Frameworks/Mono.framework/Versions/Current/Commands/MSBuild XXXX.sln /p:Configuration=Debug /p:Platform='Any CPU'

System Info:
Xamarin Studio Community
Version 6.3 (build 864)
Installation UUID: dfbf346f-829a-4a9c-9284-2bbb8d483d11
	Mono (2017-02/9667aa6) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 500000100


'/Applications/Xamarin Profiler.app' not found

Not Installed

Apple Developer Tools
Xcode 8.3.1 (12170)
Build 8E1000a

Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

Version: (Xamarin Studio Community)
Hash: 3e5ac5ff
Branch: d15-2
Build date: 2017-05-05 18:11:38-0400

Xamarin Inspector
Not Installed

Build Information
Release ID: 603000864
Git revision: 6c2f6737278ccc3e81e12276d49c0d92f975f189
Build date: 2017-04-24 11:26:01-04
Xamarin addins: d8d46e577d8507c35260ce9d73df3c33415bb214
Build lane: monodevelop-lion-d15-1

Operating System
Mac OS X 10.12.0
Darwin Maithri-iMac.local 16.0.0 Darwin Kernel Version 16.0.0
    Mon Aug 29 17:56:20 PDT 2016
    root:xnu-3789.1.32~3/RELEASE_X86_64 x86_64
Comment 1 Alex Soto [MSFT] 2017-06-23 17:33:51 UTC
Unfortunately, those two assemblies aren't supported out of the box, a list of supported assemblies by Xamarin can be found here https://developer.xamarin.com/guides/cross-platform/advanced/available-assemblies/ 

Please do not add the ones inside /Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono those are desktop assemblies which are not supported by the Xamarin runtime.

That being said, you have some options if you really need them:

For System.Data.DataSetExtensions

- You can build it yourself, the source is available here https://github.com/mono/mono/tree/master/mcs/class/System.Data.DataSetExtensions

- You can look in your favorite search engine to see if any member of the community has done this for you. A quick search brought this https://www.nuget.org/packages/HolisticWare.System.Data.DataSetExtensions/0.0.1-alpha-20159592-2252

For System.Drawing:

- I would recommend using SkiaSharp instead https://www.nuget.org/packages/SkiaSharp

- If you really want System.Drawing you can build and use https://github.com/mono/sysdrawing-coregraphics this is System.Drawing built on top of CoreGraphics.

Hope this helps.