question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Paket doesn't correctly handle Nougat compilation (v7/7.1) target for Xamarin.Android when installing Xamarin.Forms

See original GitHub issue

Description

When installing a Xamarin.Forms package into a Xamarin.Android application, targeting Nougat (v7.1), Paket creates references to .netstandard1.0 libraries, instead of the monoandroid libraries.

When I drop compile version (TargetFrameworkVersion) to 6.0, it links correctly against the MonoAndroid10 libraries

Repro steps

  1. Create a new Xamarin.Android project
  2. Install Xamarin.Forms (latest 2.4.0.282)
  3. Set Compile using Android version (TargetFramework) to 7.0 or 7.1 (Nougat)
  4. Builds will fail, since the Xamarin Android platform libraries are not linked, instead .netstandard1.0 libraries are linked

It seems there is an explicit condition set for Android7/7.1 for .netstandard1.0. This does not work for Xamarin.Forms.

ZIP file with solution attached.

Expected behavior

The referenced dlls must be from lib\MonoAndroid10 directory.

Actual behavior

The referenced dlls come from lib\netstandard1.0 directory.

Known workarounds

Drop compilation target framework to 6.0, or use Nuget.

test.zip

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
forkicommented, Jan 11, 2018

should be fixed. I added a penalty for switiching from monoandroid to netstandard

0reactions
ylatuyacommented, Jan 9, 2018

Is there anything else we can do to help resolve this issue? I would like to help but I have zero experience in F# or any other functional language. Paket is currently unusable right now for Xamarin Forms projects and we have to manually update dependencies. Rolling back to using nuget would be a downgrade in functionalities and we’d like to avoid it at any cost 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to update NuGet packages Xamarin.Forms to v2.5 ...
(1) First select a correct Target Framework for your project. ... Forms 2.5, make sure certain NuGet packages in Android has up-to-date.
Read more >
Xamarin Android Support Collection errors after updating ...
Just today I updated my NuGet packages in a project. That also updated Xamarin.Forms to version 5.0. After the update the build complained ......
Read more >
Nougat Features - Xamarin
This article explains how to get started building apps with Android Nougat to try out the new features and plan migration or feature...
Read more >
VS and msbuild can't find Xamarin frameworks after ...
I verified that Xamarin Android and iOS frameworks are installed, and that the *.CSharp.targets files exist within them.
Read more >
Can't build Xamarin for Android Project
I had the same problem after upgrading Xamarin.Build.Download in NuGet to version 0.7.1. After downgrading to 0.4.11 the problem stopped.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found