Bug 25370 - Cannot get rid of build warnings: The referenced library 'x' is not used from any code, skipping extraction of content resources
Summary: Cannot get rid of build warnings: The referenced library 'x' is not used from...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: mmp ()
Version: 1.10.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 2.4.0 (C6)
Assignee: Chris Hamons
URL:
: 34445 ()
Depends on:
Blocks:
 
Reported: 2014-12-14 15:07 UTC by Frank A. Krueger
Modified: 2015-09-30 13:14 UTC (History)
4 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Description Frank A. Krueger 2014-12-14 15:07:06 UTC
Some of us have OCD and cannot stand build warnings.

Unfortunately, every time I compile my app, I get 7 warnings - something about content resources (I don't know what a content resource is). Here are a couple:

    Warning: The referenced library 'mscorlib.dll' is not used from any code, skipping extraction of content resources. (Mecha.Mac)
    Warning: The referenced library 'System.dll' is not used from any code, skipping extraction of content resources. (Mecha.Mac)

These warnings do not show up in the build log and yet I have a persistent yellow (!) in the toolbar of Xamarin Studio. It drives me nuts because it is implying that I made a mistake somewhere (as most warnings are trying to point out) but I cannot fix it. If there is nothing I can do to fix them, then why present them? They're not actionable.

Please provide a way to turn these off. Otherwise, may I suggest turning these into Info messages that I can happily ignore (as they don't show up in the toolbar).
Comment 1 Atin 2015-01-07 13:15:30 UTC
I have checked this issue and observing the same behavior as described in bug description. As per my understanding this should be a request feature. So I am consider this issue as an enhancement.

Screencast: http://www.screencast.com/t/xAAN3gzPIv46

Environment Info:

=== Xamarin Studio ===

Version 5.7 (build 661)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.12.0 ((detached/1538a59)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000072

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.iOS ===

Version: 8.6.0.50 (Business Edition)
Hash: 561dfed
Branch: 
Build date: 2015-01-06 17:56:14-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.Mac ===

Version: 1.11.3.0 (Business Edition)

=== Build Information ===

Release ID: 507000661
Git revision: b70bab61da996da29045ea8ee8aed1a6faedbe78
Build date: 2015-01-05 16:31:31-05
Xamarin addins: 82f6c71490562d6cd125a09287f441902fdac3d7

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 2 Frank A. Krueger 2015-01-07 14:03:28 UTC
It's a bug. There is no way to get rid of the warnings.
Comment 3 Chris Hamons 2015-01-07 14:08:52 UTC
Sorry Frank. Mistake by QA.

Is this a unified project or a classic project? Do you have an example showing the issue? What channel are you on (stable? alpha?).
Comment 4 Atin 2015-01-08 10:09:37 UTC
Sorry, for observing something wrong in in comment 1. 

I have checked this issue again, and I observed that I can reproduce this issue only with the C#=>MAC =>Classic API=> Xamarin.Mac Project. I also observed that this issue does't exist with the C#=> MAC =>Unified API=> Xamarin.mac Project, In Unified API user is able to build the project successfully, without any build warning. Here is the screencast for the same.

====Classic API====
Screencast: http://www.screencast.com/t/1abgtjX6MU
Build Output: https://gist.github.com/Rajneesh360Logica/d6a97b18613c043a8c30

====Unified API====
Screencast: http://www.screencast.com/t/0qOr8hEHmE
Build Output: https://gist.github.com/Rajneesh360Logica/aae9e48c78203fbace53

Please let me know if I am missing anything ?

Environment Info:

=== Xamarin Studio ===

Version 5.7 (build 661)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.12.0 ((detached/1538a59)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000072

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.iOS ===

Version: 8.6.0.50 (Business Edition)
Hash: 561dfed
Branch: 
Build date: 2015-01-06 17:56:14-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.Mac ===

Version: 1.11.3.0 (Business Edition)

=== Build Information ===

Release ID: 507000661
Git revision: b70bab61da996da29045ea8ee8aed1a6faedbe78
Build date: 2015-01-05 16:31:31-05
Xamarin addins: 82f6c71490562d6cd125a09287f441902fdac3d7

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 5 Chris Hamons 2015-04-21 11:22:06 UTC
Fixed in md-addins 07f0cd82b8c1efcb5f2514b1e614d17ebfa0fc24 / master.

This will appear in the XM 2.2 / XS 6.0 release later this year.
Comment 6 Greg Munn 2015-09-30 13:14:56 UTC
*** Bug 34445 has been marked as a duplicate of this bug. ***