Bug 60949 - MTOUCH : error MT2101: Can't resolve the reference 'System.Func`2<System.String,System.String> Xamarin.Forms.Internals.ResourceLoader::get_ResourceProvider()', referenced from the method 'System.Void x.Mobile.Forms.UserControls.CheckBox::InitialComponent(
Summary: MTOUCH : error MT2101: Can't resolve the reference 'System.Func`2<System.Stri...
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.5.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-12-01 21:37 UTC by Kalyan Mungi
Modified: 2018-01-24 13:52 UTC (History)
4 users (show)

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


Attachments
Build log (1.75 KB, text/plain)
2017-12-01 21:37 UTC, Kalyan Mungi
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:
RESOLVED ANSWERED

Description Kalyan Mungi 2017-12-01 21:37:44 UTC
Created attachment 25890 [details]
Build log

MTOUCH : error MT2101: Can't resolve the reference 'System.Func`2<System.String,System.String> Xamarin.Forms.Internals.ResourceLoader::get_ResourceProvider()', referenced from the method 'System.Void MobileX.Forms.UserControls.CheckBox::InitializeComponent()' in 'Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'.


I'm getting this error after upgrading my xamarin forms nuget package from 2.3 to 2.5 and error is only when i'm building the ios project,, android is working fine.

I upgraded the package to use new api's (SafeAreaInset and Large tiles on ios 11) in my project.
Comment 1 Paul DiPietro [MSFT] 2017-12-01 21:41:31 UTC
Can you reproduce the issue separately in a new project? More information would be helpful in this case. Additional tips for submitting a reproduction can be found here: https://github.com/xamarin/Xamarin.Forms/wiki/Submitting-Bug-Reports
Comment 2 Kalyan Mungi 2017-12-01 22:04:36 UTC
I'm not sure if i can reproduce the issue in a completely different project.
Comment 3 Kalyan Mungi 2017-12-01 22:07:26 UTC
Is there any temporary work around to fix this issue as it is urgent for us to use the safe area layouts for iphone X UI issues.
Comment 4 Paul DiPietro [MSFT] 2017-12-01 22:16:17 UTC
Have you tried doing a complete clean of your project including manually deleting all bin/obj folders, and restarting VS? Can you also provide diagnostic info about VS including the version information?
Comment 5 Kalyan Mungi 2017-12-01 22:26:30 UTC
When i clear the bin/obj folder and restarted the vs,, I got this error

/MobileX.V2/packages/Xamarin.Forms.2.5.0.121934/build/portable-win+net45+wp80+win81+wpa81/Xamarin.Forms.targets(3,3): Error MSB4036: The "GetTasksAbi" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "/Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin" directory. (MSB4036) (MobileX.Forms.Common).



Here is my visual studio info

=== Visual Studio Community 2017 for Mac ===

Version 7.2.2 (build 11)
Installation UUID: f0df8109-887d-47d7-9d26-4eee9d46e4fb
Runtime:
	Mono 5.4.1.6 (2017-06/1f4613aa1ac) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504010006

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 1.1.0
SDK: /usr/local/share/dotnet/sdk/1.0.0-preview2-1-003177/Sdks
SDK Version: 1.0.0-preview2-1-003177
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.6
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 8.0.2.1 (Visual Studio Community)
Android SDK: /Users/nzk6vpg/Library/Developer/Xamarin/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)
		6.0    (API level 23)
		7.0    (API level 24)
		7.1    (API level 25)

SDK Tools Version: 25.2.4
SDK Platform Tools Version: 25.0.2
SDK Build Tools Version: 25.0.2

Java SDK: /usr
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Inspector ===

Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

=== Apple Developer Tools ===

Xcode 9.1 (13532)
Build 9B55

=== Xamarin.Mac ===

Version: 3.8.1.0 (Visual Studio Community)

=== Xamarin.iOS ===

Version: 11.3.0.47 (Visual Studio Community)
Hash: 51128b8c
Branch: xcode9.1
Build date: 2017-10-31 22:42:13-0400

=== Build Information ===

Release ID: 702020011
Git revision: b604c37c5a4a2f0919b45ffbe2aaad9fe040af31
Build date: 2017-11-01 08:31:43-04
Xamarin addins: d57dc14cbd4eb166ee62bab585965ab78d3650bc
Build lane: monodevelop-lion-d15-4

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Wed Oct  4 00:17:00 PDT 2017
    root:xnu-3789.71.6~1/RELEASE_X86_64 x86_64
Comment 6 Kalyan Mungi 2017-12-01 22:27:27 UTC
When i clear the bin/obj folder and restarted the vs,, I got this error

/MobileX.V2/packages/Xamarin.Forms.2.5.0.121934/build/portable-win+net45+wp80+win81+wpa81/Xamarin.Forms.targets(3,3): Error MSB4036: The "GetTasksAbi" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "/Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin" directory. (MSB4036) (MobileX.Forms.Common).



Here is my visual studio info

=== Visual Studio Community 2017 for Mac ===

Version 7.2.2 (build 11)
Installation UUID: f0df8109-887d-47d7-9d26-4eee9d46e4fb
Runtime:
	Mono 5.4.1.6 (2017-06/1f4613aa1ac) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504010006

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 1.1.0
SDK: /usr/local/share/dotnet/sdk/1.0.0-preview2-1-003177/Sdks
SDK Version: 1.0.0-preview2-1-003177
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.6
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 8.0.2.1 (Visual Studio Community)
Android SDK: /Users/nzk6vpg/Library/Developer/Xamarin/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)
		6.0    (API level 23)
		7.0    (API level 24)
		7.1    (API level 25)

SDK Tools Version: 25.2.4
SDK Platform Tools Version: 25.0.2
SDK Build Tools Version: 25.0.2

Java SDK: /usr
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Inspector ===

Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

=== Apple Developer Tools ===

Xcode 9.1 (13532)
Build 9B55

=== Xamarin.Mac ===

Version: 3.8.1.0 (Visual Studio Community)

=== Xamarin.iOS ===

Version: 11.3.0.47 (Visual Studio Community)
Hash: 51128b8c
Branch: xcode9.1
Build date: 2017-10-31 22:42:13-0400

=== Build Information ===

Release ID: 702020011
Git revision: b604c37c5a4a2f0919b45ffbe2aaad9fe040af31
Build date: 2017-11-01 08:31:43-04
Xamarin addins: d57dc14cbd4eb166ee62bab585965ab78d3650bc
Build lane: monodevelop-lion-d15-4

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Wed Oct  4 00:17:00 PDT 2017
    root:xnu-3789.71.6~1/RELEASE_X86_64 x86_64
Comment 7 Paul DiPietro [MSFT] 2017-12-01 22:32:02 UTC
That error seems related to https://bugzilla.xamarin.com/show_bug.cgi?id=60293. Is it a .NET Standard project (and if so, what version is it on)? Some discussion occurs at https://forums.xamarin.com/discussion/comment/307054 and suggest restarting VS again.
Comment 8 Kalyan Mungi 2017-12-01 22:48:35 UTC
Restarting IDE didn't work,, I'm using .NET Portable : PCL 4.5 - Profile 111. I dont see this file {ProjectName}.nuget.targets  in my project files.
Comment 9 Paul DiPietro [MSFT] 2017-12-04 04:22:49 UTC
Can you verify that your Forms versions are all the same across projects? If yes, can you please also verify if you are using XamlCompilation?
Comment 10 Kalyan Mungi 2017-12-04 15:00:56 UTC
Yes, Forms version is some across all the projects, where Xamarin.Forms referenced which is 2.5.0.121934. I'm using the xaml compilation
Comment 11 Kalyan Mungi 2017-12-04 15:01:57 UTC
Android is building successfully and deploying. Problem is only with iOS
Comment 12 Kalyan Mungi 2017-12-04 17:14:10 UTC
Downgraded to 2.4.0.282 and it worked.
Comment 13 Kalyan Mungi 2017-12-05 20:07:40 UTC
fixed
Comment 14 Paul DiPietro [MSFT] 2017-12-06 16:20:14 UTC
Marking as resolved