Bug 21657 - Cannot compile default Forms Shared project
Summary: Cannot compile default Forms Shared project
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.2
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-29 09:56 UTC by ilya.golovach
Modified: 2014-08-19 07:18 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 ilya.golovach 2014-07-29 09:56:25 UTC
Cannot compile default Forms Shared project right after its creation (no modifications).
The error:
Error MT2002: Failed to resolve "System.Linq.Expressions.Expression System.Linq.Expressions.ExpressionVisitor::Visit(System.Linq.Expressions.Expression)" reference from "System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" (MT2002)

The issue is resolved by changing the linker behavior. Doesn't work with "Link SDK assemblies only", but compiles with other 2 options. Got the warning though with "Link all assemblies" option:
Warning MT3005: The dependency 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' of the assembly 'Xamarin.Forms.Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' was not found. Please review the project's references. (MT3005)

Installation details:

=== Xamarin Studio ===

Version 5.1.4 (build 0)
Installation UUID: 2b7ec538-f619-494b-9d6f-7e50d943d882
Runtime:
	Mono 3.4.0 ((no/c3fc3ba)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000204

=== Xamarin.Android ===

Not Installed

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.iOS ===

Version: 7.0.6.168 (Business Edition)
Hash: 2ed9bc9
Branch: 
Build date: 2014-21-01 06:33:05-0500

=== Xamarin.Mac ===

Version:

=== Build Information ===

Release ID: 501040000
Git revision: 7d45bbe2ee22625f125d0c52548524f02d005cca
Build date: 2014-07-14 12:15:53-04
Xamarin addins: c78f1d88e57baa928aeee1484d96e6f8edf8de33

=== Operating System ===

Mac OS X 10.8.5
Darwin localhost 12.5.0 Darwin Kernel Version 12.5.0
    Sun Sep 29 13:33:47 PDT 2013
    root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
Comment 1 ilya.golovach 2014-08-08 18:37:31 UTC
I have just updated Xamarin.Forms to latest 1.2.2.6243 and "Link all assemblies" stopped working as well. So, only "Don't link" option works.

The current error is:
Error MT2002: Failed to resolve "System.Linq.Expressions.Expression System.Linq.Expressions.ExpressionVisitor::Visit(System.Linq.Expressions.Expression)" reference from "System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" (MT2002)
Comment 2 Mohit Kheterpal 2014-08-19 07:18:16 UTC
I have checked this issue and I am able to run forms shared template as default and with Link all/Link SDK only.

as shown in screencast :http://screencast.com/t/unC41Y83q


I have checked it on following builds and you will get the fixed builds sooner.

As of now I am closing this issue and please reopen it, if you will get this issue again.

Thanks

=== Xamarin Studio ===

Version 5.3 (build 428)
Installation UUID: 449f40dd-b3f1-4028-9a6b-cca0d1a2307d
Runtime:
	Mono 3.8.0 ((no/62a857e)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000007

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.iOS ===

Version: 7.4.0.102 (Business Edition)
Hash: 141adb9
Branch: 
Build date: 2014-08-15 12:54:28-0400

=== Xamarin.Android ===

Version: 4.16.0 (Business Edition)
Android SDK: /Users/360logicaxamarinmacmini/Desktop/android-sdk-macosx
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		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)
		4.5    (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.10.0.9 (Business Edition)

=== Build Information ===

Release ID: 503000428
Git revision: 3166b1cd326fbea84dcf024e73cb31ccc83a9811
Build date: 2014-08-15 14:50:33-04
Xamarin addins: 3d041b1639f938107c5e1c71c54d9a346b30c660

=== Operating System ===

Mac OS X 10.8.4
Darwin 360Logicas-Mac-mini.local 12.4.0 Darwin Kernel Version 12.4.0
    Sun Mar 10 18:01:10 PDT 2013
    root:xnu-2050.24.6~1/RELEASE_X86_64 x86_64