-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paket doesn't correctly handle Nougat compilation (v7/7.1) target for Xamarin.Android when installing Xamarin.Forms #2809
Comments
In the attached zip you didn't set your TargetFrameworkIdentifier to MonoAndroid |
Does this need to be set? I've never had to do that. Also why would it then work for Android 6 and below? |
Yes I think it always need to be set - otherwise the when condition is not fulfilled |
After some digging,
Note that we're emitting two different When conditions for Android, so this seems to be intentional: This includes the dlls from
and then below that, this condition includes dlls from the netstandard10 directory:
Note that we're specifically pointing MonoAndroid v7.0/v7.1/v8.0 to these directories. My guess is something to do with some recent .NET Standard change. I'll dig through the code when I get a chance. |
This likely happens because of this: In FrameworkHandling.fs:
In combination with the following nuspec:
My guess is this causes paket to write references for Xamarin.Forms package to the .NETStandard framework for MonoAndroid 7/7.1/8. For Xamarin Forms to work properly, the references need to be made to the MonoAndroid framework. @forki is my assessment correct? Any suggestions on how I can go about fixing this? |
Why is setting the target framework not working for you? |
Do you mean setting the framework restriction in paket.references? I've tried setting |
No in very first comment I meant setting TargetFrameworkIdentifier in the csproj. |
Nope, that doesn't have any impact because:
See the above two |
Can you please send a modified csproj with what you think paket should add?
Then I can look at the diff
Am 26.11.2017 09:53 schrieb "tastyeggs" <[email protected]>:
… Nope, that doesn't have any impact because:
1. TargetFrameworkIdentifier is set by Xamarin.Android.CSharp.targets
anyway
2. The real issue here is MonoAndroid 7/7.1/8 are treated differently
from MonoAndroid <= 6, and as a result they aren't getting the essential
references required to compile the project.
See the above two When conditions in my third comment -- MonoAndroid
7/7.1/8 are set to use references from the .netstandard directory instead
of the MonoAndroid10 directory. This works just fine when I set
TargetFrameworkVersion to 6.0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2809 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNIgWqi0S86gJUPYEgEdZHqVkDs1_ks5s6ScggaJpZM4PqCnX>
.
|
That doesn't mean paket can find it... |
It's not important if paket finds it. But MSBuild
Am 26.11.2017 10:03 schrieb "Matthias Dittrich" <[email protected]>:
… TargetFrameworkIdentifier is set by Xamarin.Android.CSharp.targets anyway
That doesn't mean paket can find it...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2809 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNGRdKX9kdNpiobO3gO8PrP2dMrK8ks5s6SlagaJpZM4PqCnX>
.
|
Sure, I've attached two csproj files in the ZIP file:
|
Apologies, closed by mistake |
I can reproduce the issue too, where for Android it's using lib/netstandard1.0 instead of lib/MonoAndroid10.
Here is the relevant part of the csproj where for iOS it's doing it correctly and for Android it's using the same condition as for Net45
And this is how it should be
|
Here is a diff of the changes after trying to upgrade to Xamarin.Forms 2.5 that explains a bit better the impact of the issue: |
I have found another issue related to the same problem. Xamarin.Forms 2.5 has dependencies to Xamarin.Android.Support.foo packages that are no longer referenced in the csproj either. |
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 :) |
should be fixed. I added a penalty for switiching from monoandroid to netstandard |
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
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
The text was updated successfully, but these errors were encountered: