Bug 24534 - Xamarin.Mac Library Project has incorrect/corrupted XamMac reference
Summary: Xamarin.Mac Library Project has incorrect/corrupted XamMac reference
Status: VERIFIED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Other ()
Version: 1.10.0
Hardware: PC Mac OS
: High normal
Target Milestone: 2.4.0 (C6)
Assignee: Chris Hamons
URL:
: 28112 ()
Depends on:
Blocks:
 
Reported: 2014-11-14 11:05 UTC by Prashant Cholachagudda
Modified: 2016-06-21 13:56 UTC (History)
5 users (show)

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


Attachments
Example project sent to support (5.77 MB, application/x-zip-compressed)
2014-12-05 16:24 UTC, eboren
Details


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:
VERIFIED FIXED

Description Prashant Cholachagudda 2014-11-14 11:05:09 UTC
Xamarin.Mac Library Project has incorrect/corrupted XamMac reference 

· File -> New -> Solution…

· Select C# / Mac / Classic API / Xamarin.Mac Project

· Type a solution name, click OK

· Right click the solution, select Add -> Add New Project…

· Select C# / Mac / Classic API / Xamarin.Mac Library Project

· Type a project name, click OK


At this point, expand the references for the library project and you will see the red X next to XamMac, with error "Assembly not found for framework Mono / .NET 4.5".

Version Info:

=== Xamarin Studio ===

Version 5.5.3 (build 6)
Installation UUID: 405ce01e-840a-449b-81a9-8c154a268953
Runtime:
Mono 3.10.0 ((detached/e204655)
GTK+ 2.24.23 (Raleigh theme)

Package version: 310000023

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.iOS ===

Version: 8.4.0.16 (Business Edition)
Hash: 80e9ff7
Branch:
Build date: 2014-10-22 15:09:12-0400

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Xamarin.Android ===

Not Installed

=== Build Information ===

Release ID: 505030006
Git revision: fbe3e9453daf6a3bb9a9709ed22bec35f7c9056b
Build date: 2014-10-23 13:08:38-04
Xamarin addins: e44add2b39de4dd57c0742bb2e620dfad84c64c6

=== Operating System ===

Mac OS X 10.9.5
Darwin engineering-air.proxynetworks.com<http://engineering-air.proxynetworks.com>; 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 1 Sadik Ali 2014-11-17 01:50:39 UTC
I have checked this issue and able to reproduce it. I have created an iOS Classic Xam Solution and add an iOS Classic Xam  project to  solution and observed that it did not load XamMac assembly.

Screencast Regarding same : http://screencast.com/t/Ryfjlw9rhx

IDE Log :  https://gist.github.com/Shruti360/3eb5f6f1c952dd270405

Environment Info :
=== Xamarin Studio ===

Version 5.7 (build 538)
Installation UUID: 67eaf3b4-f8a7-4ab4-a9df-3197350ca5dc
Runtime:
	Mono 3.10.0 ((detached/e204655)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000023

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.iOS ===

Version: 8.4.0.16 (Business Edition)
Hash: 80e9ff7
Branch: 
Build date: 2014-10-22 15:09:12-0400

=== Xamarin.Android ===

Version: 4.18.1.3 (Business Edition)
Android SDK: /Users/ixamarin78/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)
		3.2    (API level 13)
		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)
Java SDK: /usr
No Java runtime present, requesting install.

=== Xamarin.Mac ===

Version: 1.11.1.3 (Business Edition)

=== Build Information ===

Release ID: 507000538
Git revision: fca0c4bb54656b0be9a5ec4a054dd50858d58544
Build date: 2014-11-14 05:55:14-05
Xamarin addins: dbbea4d170177ea0a47ef02491a7a322850102da

=== Operating System ===

Mac OS X 10.10.0
Darwin XamnewiMac.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 2 Chris Hamons 2014-12-05 16:08:21 UTC
This is not a bug. Let me explain the confusion:

There are two worlds, Classic and Unified.

- Xamarin.Mac Project is a Classic project, which targets the .NET 4.5 framework.
- The Xamarin.Mac Library under Unified is a Unified project, which targets the mobile subset of .NET.

One can not reference another. You could: 

- Make a Xamarin.Mac Library the one under Classic.
- Migrate your project to unified
- In XS 5.7 you can bring up the project properties and select an unsupported unified / classic desktop combo.
Comment 3 eboren 2014-12-05 16:19:24 UTC
As spelled out in the original report, the issue is with creating a  Mac/Classic API/Xamarin.Mac Project and adding to it a Mac/Classic API/Xamarin.Mac Library Project. 

We are not referencing a Unified project.
Comment 4 Chris Hamons 2014-12-05 16:20:27 UTC
Can you attach an example of this problem? I just tried our our latest Alpha an everything seemed to work fine for me.
Comment 5 eboren 2014-12-05 16:24:42 UTC
Created attachment 8985 [details]
Example project sent to support

Here is the original e-mail I sent to support:

Hello Support, 

From Xamarin Studio, I create a new Classic API/Xamarin.Mac Library Project to add to an existing Classic API/Xamarin.Mac Project. The resulting library project won’t build:

Assembly 'XamMac' not found. Make sure that the assembly exists in disk. If the reference is required to build the project you may get compilation errors.

Looking at the references for the library project, I see XamMac greyed out with a red X. Error is “Assembly not found for framework Mono / .NET 4.5”. 

It turns out that if I then switch to a new solution, or exit Xamarin Studio, then reload the solution, I can build (the reference is found). This happens everytime I create a Xamarin.Mac Library project though.
Comment 6 Chris Hamons 2014-12-05 16:35:04 UTC
Alright, I see the issue.

This appears to be a duplicate of https://bugzilla.xamarin.com/show_bug.cgi?id=17833

I'll keep this open
Comment 7 Chris Hamons 2014-12-05 16:36:56 UTC
And apologies for the confusion eboren.
Comment 8 Chris Hamons 2015-03-17 13:03:51 UTC
https://bugzilla.xamarin.com/show_bug.cgi?id=28112 and  https://bugzilla.xamarin.com/show_bug.cgi?id=27893 are probably dups as well, but keeping them open to test the various tests cases when we have a fix.
Comment 9 Chris Hamons 2015-04-20 14:25:11 UTC
Fixed in master / 537789c3387da468a5fed98e3bb177dcdd676622.

This is actually an md-addin fix, so you'll need to test XS master to get this.
Comment 10 Chris Hamons 2015-04-20 14:25:28 UTC
This will be fixed in XS 6.0 later this year.
Comment 11 Rajneesh Kumar 2015-10-05 07:08:09 UTC
I have checked this issue and observed that this issue has been fixed and no longer exist with this build. Now I observed that on expanding the references for the library project it does't show any error , now XamMac reference load successfully.

Screencast: http://www.screencast.com/t/7VwzvxKQZBw

This issue has been fixed, hence I am closing this issue.

Thanks..!

Environment Info:

=== Xamarin Studio ===

Version 5.10 (build 811)
Installation UUID: 0b7eaebc-a0ed-4b58-81df-91e378cad28c
Runtime:
	Mono 4.2.1 (explicit/cc1cf60)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010062

=== Xamarin.Profiler ===

Version: 0.0.0.0
Location: /Applications/XamarinProfiler.Mac.app/Contents/MacOS/XamarinProfiler.Mac

=== Apple Developer Tools ===

Xcode 7.0 (8227)
Build 7A220

=== Xamarin.Mac ===

Version: 2.4.0.79 (Enterprise Edition)

=== Xamarin.iOS ===

Version: 9.2.0.84 (Enterprise Edition)
Hash: b5396c2
Branch: master
Build date: 2015-09-30 15:22:15-0400

=== Xamarin.Android ===

Version: 6.0.0.8 (Enterprise Edition)
Android SDK: /Users/Admin_Mac/Desktop/Anddk/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		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)
		5.1    (API level 22)

SDK Tools Version: 24.3.4
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 22.0.1

Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.1
Location: /Applications/Xamarin Android Player.app

=== Build Information ===

Release ID: 510000811
Git revision: 34cd31ea72536afab530c14d9220b286075e83cd
Build date: 2015-09-30 10:40:37-04
Xamarin addins: 8e6fccfc0c19a7e0b7b11be925f09751d827eb5c
Build lane: monodevelop-lion-cycle6

=== Operating System ===

Mac OS X 10.11.0
Darwin Admin-Macs-Mac-mini.local 15.0.0 Darwin Kernel Version 15.0.0
    Wed Aug 26 16:57:32 PDT 2015
    root:xnu-3247.1.106~1/RELEASE_X86_64 x86_64
Comment 12 Oleg Demchenko 2016-06-21 13:56:26 UTC
*** Bug 28112 has been marked as a duplicate of this bug. ***