Closed Jooe20 closed 2 months ago
That folder should be included by default in APK assets. Does it only skip large files?
I only tried one file but I will try a small file and come back to comment.
Small files are also not included. I used MAUI AboutAssets.txt and tried to open it like this :
async Task >string< LoadMauiAsset() { using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt"); using var reader = new StreamReader(stream); var contents = reader.ReadToEnd(); return contents ; }
but I got FileNotFound exception. I even copied
" AboutAssets.txt" manually into the asset folder created by CSharpShell but the error still persists.
Seems to to an issue with MAUI projects. I will see about fixing it it soon
Alright. Thanks.
&ItemGroup& & MauiAsset Include="Resources\Raw**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" /& & /ItemGroup&
NOTE: I replaced < with & bcos xml comment is not visible.
I used the above build action in .csproj to include a large file (50 MB) as a raw asset but the file is not included in the exported apk. Am I doing something wrong? Do I have to include the name of the file ( Data.db) despite the fact that it is in "Resources\Raw\" folder which I have tried already without success? Thanks a lot I am new to MAUI.