Closed TimLariviere closed 4 years ago
It may also cause the issue when I try to add Fabulous.SimpleElements. https://github.com/Zaid-Ajaj/fabulous-simple-elements/issues/14
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>
@albertwoo Unfortunately we can't migrate from packages.config
to PackageReference
.
See https://github.com/fsprojects/Fabulous/issues/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.
Oh, that is so sad. So what we can do is just wait :)
Can't you use MSBuild.Sdk.Extras?
@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 https://github.com/fsprojects/Fabulous/issues/181#issuecomment-420783259 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.
The Android template has been migrated to AndroidX in v0.55, so it should be good now.
The Android template seems to be missing some dlls required by Xamarin.Forms. (
Support something something LiveData.dll
andJava.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.