Skip to content
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

Check dependencies for the Android template #542

Closed
TimLariviere opened this issue Aug 5, 2019 · 7 comments
Closed

Check dependencies for the Android template #542

TimLariviere opened this issue Aug 5, 2019 · 7 comments
Labels
a/templates The issue is regarding the templates p/android Android s/ready This issue is ready to be implemented t/bug Something isn't working as expected

Comments

@TimLariviere
Copy link
Member

TimLariviere commented Aug 5, 2019

The Android template seems to be missing some dlls required by Xamarin.Forms. (Support something something LiveData.dll and Java.Interop)

When updating the Xamarin.Forms package, they get added to the project even though XF doesn't update its Android dependencies.

We need to check that.

@TimLariviere TimLariviere added t/bug Something isn't working as expected a/templates The issue is regarding the templates proj/xamarinforms p/android Android labels Aug 5, 2019
@albertwoo
Copy link

It may also cause the issue when I try to add Fabulous.SimpleElements. Zaid-Ajaj/fabulous-simple-elements#14

@albertwoo
Copy link

Can do not use packages.config for manage nuget packages? Because I see the csproj for android created by visual studio 2019 xamarin forms template is not using that and its nuget package is managed directly in the csproj like this (which is very similar with net core project format):

  <ItemGroup>
    <PackageReference Include="Xamarin.Android.Support.v4" Version="25.4.0.2" />
    <PackageReference Include="Xamarin.Forms" Version="3.1.0.637273" />
    <PackageReference Include="Xamarin.Android.Support.Design" Version="25.4.0.2" />
    <PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="25.4.0.2" />
    <PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="25.4.0.2" />
    <PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="25.4.0.2" />
  </ItemGroup>

@TimLariviere
Copy link
Member Author

@albertwoo Unfortunately we can't migrate from packages.config to PackageReference.

See #181 for more information.

TLDR: Visual Studio (Windows) doesn't support old format fsproj with PackageReference (and no further feature will be added). We have to wait for Xamarin to move to the new format instead.

@albertwoo
Copy link

Oh, that is so sad. So what we can do is just wait :)

@Happypig375
Copy link

Can't you use MSBuild.Sdk.Extras?

@TimLariviere
Copy link
Member Author

TimLariviere commented Sep 3, 2019

@Happypig375 MSBuild.Sdk.Extras is the same issue.
You can convert the projects with it and get them to build via MSBuild, but depending on your IDE, you will be unable to debug.

See #181 (comment) for more info on MSBuild.Sdk.Extras in Fabulous

PackageReference Visual Studio (Windows) Visual Studio for Mac JetBrains Rider
Old format fsproj ❌ No ✅ Yes ✅ Yes
MSBuild.Sdk.Extras ❌ No ❌ No ✅ Yes

If you happen to use 1 specific IDE that supports your scenario, you can apply PackageReference to your solution.
But Fabulous can't use PackageReference by default in the templates, because we don't know which IDE people will use.

@TimLariviere TimLariviere added this to the vCurrent (1.0) milestone Feb 10, 2020
@TimLariviere TimLariviere added s/ready This issue is ready to be implemented and removed proj/xamarinforms labels Feb 18, 2020
@TimLariviere
Copy link
Member Author

The Android template has been migrated to AndroidX in v0.55, so it should be good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/templates The issue is regarding the templates p/android Android s/ready This issue is ready to be implemented t/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants