| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Important
This library is no longer needed for .NET 8 and higher.
Please remove it from your projects when you migrate.
MSBuild task to expose resources to F# Xamarin.Android / .NET Android projects up until .NET 7.
Starting .NET 8, F# Android projects work out of the box without the need for this library.
Microsoft improved access to assets in your Android apps. They generate an assembly named _Microsoft.Android.Resource.Designer which contains all your Android assets, instead of silently injecting C# code into your F# projects.
- <PackageReference Include="Xamarin.Android.FSharp.ResourceProvider" />
+ <PackageReference Include="FSharp.Android.Resource" /><PropertyGroup>
- <AndroidResgenFile>Resources/Resource.designer.cs</AndroidResgenFile>
- <AndroidUseIntermediateDesignerFile>false</AndroidUseIntermediateDesignerFile>
</PropertyGroup>type MainActivity() =
inherit Activity()
// This is required for the app to pick up the right resources
do Resource.UpdateIdValues()
member _.OnCreate(bundle) =
base.OnCreate(bundle)
// Now you can use Resource like usual
this.SetContentView(Resource.Layout.Main)Given the first build will always fail, you can use the following steps to workaround it:
msbuild -t:CompileResourceDesignerForFSharp
msbuild -t:Build| Back | FazBrowse Home | New Git URL |