Bug 56648 - warning XA0105: The $(TargetFrameworkVersion) for Mono.Android.Export.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.
Summary: warning XA0105: The $(TargetFrameworkVersion) for Mono.Android.Export.dll (v7...
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 7.3 (15.2)
Hardware: PC Windows
: High normal
Target Milestone: 15.5
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2017-05-18 23:15 UTC by joeperkins
Modified: 2017-09-06 21:32 UTC (History)
10 users (show)

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


Attachments
Sample project (31.55 KB, application/zip)
2017-05-25 12:16 UTC, Nate Cook
Details
updated sample project with new repro (32.29 KB, application/zip)
2017-08-28 19:37 UTC, Nate Cook
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 FIXED

Description joeperkins 2017-05-18 23:15:08 UTC
After updating to Xamarin 4.5.0.443 (c871575) the following warring is logged 

warning XA0105: The $(TargetFrameworkVersion) for Mono.Android.Export.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.

To reproduce create a project in VS 2015 Xamarin 4x the uses Mono.Android.Export.dll and build, upgrade to Xamarin 4.5.0.443 and clean\rebuild and the warring in logged.


Microsoft Visual Studio Professional 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Professional

LightSwitch for Visual Studio 2015   00322-40000-00000-AA087
Microsoft LightSwitch for Visual Studio 2015

Microsoft Visual Studio Tools for Applications 2015   00322-40000-00000-AA087
Microsoft Visual Studio Tools for Applications 2015

Visual Basic 2015   00322-40000-00000-AA087
Microsoft Visual Basic 2015

Visual C# 2015   00322-40000-00000-AA087
Microsoft Visual C# 2015

Visual C++ 2015   00322-40000-00000-AA087
Microsoft Visual C++ 2015

Visual F# 2015   00322-40000-00000-AA087
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - ENU   00322-40000-00000-AA087
Windows Phone SDK 8.0 - ENU

ASP.NET and Web Tools 2015.1   14.1.21111.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.9.6   14.0.21111.0
Azure App Service Tools v2.9.6

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.2.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

DataFactoryProject   1.0
Microsoft Data Factory Package

Extensions Monitor Extension   1.0
ExtensionsMonitor Visual Studio Extension Detailed Info

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JetBrains ReSharper Ultimate 10.0.2   Build 104.0.20151218.120627
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc.

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft .NET Core Tools (Preview 2)   14.1.21111.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Data Factory Node Node   1.0
Azure Data Factory extension for Visual Studio Server Explorer.

Microsoft Azure Hive Query Language Service   2.2.5000.0
Language service for Hive query

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.7
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.7.30818.1601

Microsoft Azure Tools   2.8
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.8.40211.2

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.41104.6

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2015 ENU   14.0.23928
Microsoft Office Developer Tools for Visual Studio 2015 ENU

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Analysis Services   13.0.1701.8
Microsoft SQL Server Analysis Services Designer 
Version 13.0.1701.8

SQL Server Data Tools   14.0.61021.0
Microsoft SQL Server Data Tools

SQL Server Integration Services   
Microsoft SQL Server Integration Services Designer
Version 13.0.1601.5

SQL Server Reporting Services   13.0.1701.8
Microsoft SQL Server Reporting Services Designers 
Version 13.0.1701.8

SQLite & SQL Server Compact Toolbox   4.7
SQLite & SQL Server Compact Toolbox adds scripting, import, export, rename, query execution and much more to SQL Server Compact & SQLite Data Connections.

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Visual Studio Tools for Apache Cordova   Update 10
Visual Studio Tools for Apache Cordova

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   4.5.0.443 (c871575)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.3.0.13 (448f54f)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.10.0.30 (30b6e87)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 Nate Cook 2017-05-25 12:15:28 UTC
Same here. I will attach a sample project

=== Visual Studio Professional 2017 for Mac ===

Version 7.0.1 (build 24)
Installation UUID: 3234d07d-f7a0-4180-b21d-d2c24ed872f6
Runtime:
	Mono 5.0.1.1 (2017-02/5077205) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 500010001

=== NuGet ===

Version: 4.0.0.2323

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
SDK: /usr/local/share/dotnet/sdk/1.0.0-preview2-003156/Sdks
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

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

=== Xamarin.Android ===

Version: 7.3.1.1 (Visual Studio Professional)
Android SDK: /Users/ncook/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.4 (API level 19)
		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.5
SDK Platform Tools Version: 25.0.6
SDK Build Tools Version: 25.0.3

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

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

=== Apple Developer Tools ===

Xcode 8.3.2 (12175)
Build 8E2002

=== Xamarin.iOS ===

Version: 10.10.0.36 (Visual Studio Professional)
Hash: d2270eec
Branch: d15-2
Build date: 2017-05-22 16:30:53-0400

=== Xamarin.Mac ===

Version: 3.4.0.36 (Visual Studio Professional)

=== Xamarin Inspector ===

Version: 1.2.2
Hash: b71b035
Branch: d15-1
Build date: Fri, 21 Apr 2017 17:57:12 GMT

=== Build Information ===

Release ID: 700010024
Git revision: 7ab1ca2ced6f584e56b7a0d4d321d00775cd95c9
Build date: 2017-05-19 05:44:51-04
Xamarin addins: 08d17158f3365beee5e60f67999e607cce4b3f93
Build lane: monodevelop-lion-d15-2

=== Operating System ===

Mac OS X 10.12.5
Darwin 16.6.0 Darwin Kernel Version 16.6.0
    Fri Apr 14 16:21:16 PDT 2017
    root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
Comment 2 Nate Cook 2017-05-25 12:16:05 UTC
Created attachment 22454 [details]
Sample project
Comment 3 dean.ellis 2017-05-26 11:39:14 UTC
It looks like the Mono.Android.Export.dll despite being in the v2.3 directory is being built with the v7.1 framework. This is why the warning is showing.
Comment 4 joeperkins 2017-05-26 21:51:48 UTC
Any idea what the impact would be using Mono.Android.Export.dll 7.1 targeting 6.0?
Comment 5 dean.ellis 2017-05-30 09:18:48 UTC
it should be ok. I doubt it will be using any API's which are not exposed in 6.0. 
This does seems to be a packaging error in our build system. For some reason the 7.1 dll was being deployed to all the framework directories, rather than the specific versions.
Comment 6 Nate Cook 2017-08-18 14:07:07 UTC
Can we please get this fixed? Between this bugzilla and #56834 we have 15 warnings every time we build our Android app. Both sets of warnings appeared when we started using Visual Studio for Mac.
Comment 7 Jonathan Pryor 2017-08-28 18:50:27 UTC
This *should* have been fixed in:

https://github.com/xamarin/xamarin-android/commit/35f732ed69f67d62d0a5edc3d1c74ec102ec93f5
monodroid/master/cdd776ab

Those commits are also in d15-3/Xamarin.Android 7.4.x, currently in stable.

Current/stable `Mono.Android.Export.dll` also has a `TargetFrameworkVersionAttribute` which specifies v2.3:

> $ ikdasm /Library/Frameworks/Xamarin.Android.framework/Libraries/xbuild-frameworks/MonoAndroid/v2.3/Mono.Android.Export.dll
> ...
>   .custom instance void [mscorlib]System.Runtime.Versioning.TargetFrameworkAttribute::.ctor(string) = ( 01 00 18 4D 6F 6E 6F 41 6E 64 72 6F 69 64 2C 56   // ...MonoAndroid,V
>                                                                                                         65 72 73 69 6F 6E 3D 76 32 2E 33 01 00 54 0E 14   // ersion=v2.3..T..
>                                                                                                         46 72 61 6D 65 77 6F 72 6B 44 69 73 70 6C 61 79   // FrameworkDisplay
>                                                                                                         4E 61 6D 65 00 )                                  // Name.
Comment 8 Nate Cook 2017-08-28 19:37:13 UTC
@Jonathan Pryor - I'm still seeing XA0105 warnings with Xamarin.Android 7.4.x in stable. It is no longer reproduceable though with the currently attached sample project. I will attach a new sample project now.
Comment 9 Nate Cook 2017-08-28 19:37:55 UTC
Created attachment 24445 [details]
updated sample project with new repro
Comment 10 Sumanta Welekar 2017-09-06 15:28:31 UTC
Not able to reproduce using attachment from Comment #9. 

Verified on latest 15-4 build.       

Build Info : https://gist.github.com/SumantaWelekar/3891fd872cef15a06dde7e1c179e326c

Screencast : https://www.screencast.com/t/LV6QO4C4I3G
Comment 11 Nate Cook 2017-09-06 16:27:58 UTC
@Sumanta Welekar the repo from Comment #9 is for Visual Studio for Mac, stable branch. Jonathan Pryor said it was fixed in Android 7.4.x, currently in stable.
Comment 12 Nate Cook 2017-09-06 21:32:49 UTC
I switched to the alpha branch and can confirm that I can still reproduce the problem with Visual Studio for Mac 15-4 using the the sample project from Comment #9

Can we please re-open this?

=== Visual Studio Professional 2017 for Mac (Preview) ===

Version 7.2 Preview (7.2 build 540)
Installation UUID: 3234d07d-f7a0-4180-b21d-d2c24ed872f6
Runtime:
	Mono 5.4.0.167 (2017-06/6b8abfeb7cc) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504000167

=== NuGet ===

Version: 4.3.0.4199

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	2.0.0
	1.0.3
SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks
SDK Versions:
	2.0.0
	1.0.0-preview2-003156
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.0/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: 7.5.0.13 (Visual Studio Professional)
Android SDK: /Users/ncook/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.1 (API level 16)
		4.4 (API level 19)
		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.5
SDK Platform Tools Version: 26
SDK Build Tools Version: 25.0.3

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

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

=== Apple Developer Tools ===

Xcode 8.3.3 (12175.1)
Build 8E3004b

=== Xamarin.iOS ===

Version: 10.14.0.24 (Visual Studio Professional)
Hash: 43c281b4
Branch: d15-4
Build date: 2017-08-23 15:23:10-0400

=== Xamarin.Mac ===

Version: 3.8.0.3 (Visual Studio Professional)

=== Xamarin Inspector ===

Version: 1.3.0-rc2
Hash: fab36d8
Branch: 1.3-release
Build date: Wed, 30 Aug 2017 21:15:37 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 702000540
Git revision: 937feef24e2d1caad12f34780602b39a33c44ece
Build date: 2017-08-17 08:32:35-04
Xamarin addins: 9bbcd5509a57e89460cafd47eb52bdb2a26d2437
Build lane: monodevelop-lion-d15-4

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

AddinMaker 1.3.7
Manifest.addin 0.0.0.0