-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Copy font assets only works at second build #23268
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Closed similar issues:
|
The same/similar happens in Debug config. I think the users don't notice this because in debug mode the app is usually already installed and the font files are already stored on the device. Or the user rebuild the app multiple times and then the assets are there. Edit: Perhaps this doesn't happen only with font assets. |
I can repro this issue on the latest 17.11.0 Preview 2.1 (8.0.60 & 8.0.40) |
I provided a similar issue/bug report on this months ago... If you delete the "obj/bin" folders, and compile/deploy the application (debug OR release), it will ALWAYS leave some of your "resources" behind. Sometimes it is a font file, or two... Most of the time, it is the images... And rarely, a file from the "Assets" folder. You have to compile, deploy, the compile again for it to "collect" all of your resources. It NEVER works on the first try after removing the "obj/bin" folders! This happens on Android, and Windows... |
@Stedy59 would you happen to have the issue number for that? |
I looked and could not find the issue reported. I do remember commenting, such as I did here, on this issue months ago. The multiple compile/deploy regiment is required if you remove the "obj/bin" folders. Also, on a side note... Since all of my "controls (15) / core" are in libraries, sometimes changes WILL NOT be included in subsequent builds unless I remove the "obj/bin" folders... I author custom code libraries for Zebra/Honeywell/Data Logic devices (Barcode scanners / RFID / etc.) |
ok lets ping @jfversluis again as he was the one interested in it :) |
@ninachen03 (or anyone really) are you able to get a binlog of the build not working properly? I have been preparing for a demo all week and probably build like 20 brand new projects and they all just worked. A binlog of a fail and a success will be most helpful. |
It took me more than an hour, but unfortunately, I only managed to reproduce it once. I will continue to pay attention to this issue and add the log once I collect it. |
@mattleibow |
@AlleSchonWeg find my email address on my GitHub profile and send it there or share a link to OneDrive if its too big to attach. |
Microsoft Visual Studio 17.10.5 |
Hi @jfversluis or @mattleibow |
Seems that using .Net CLI copies the fonts to assets on every publish in contrast to VS IDE |
The issue is most likely because Rebuild command launches design-time build in VS 2022 IDE, which leads to two same build processes running at the same time, causing random sharing violations. By contrast, Build command does not typically cause design-time build to run, hence things work on the second build. Or if you keep Visual Studio closed, and use |
Description
I wondered, why me IconFont was not working in release mode. The font is in Resources\Fonts\ folder referenced in .csproj:
I builded the app and deployed it to the simulator but no icon was shown. Hmm, in debug mode it works. So i looked in the obj folder. In Debug\net8.0-android\assets my ttf file was shown. In Release\net8.0-android\assets was no ttf file:
I started deleting obj/bin folders and rebuild. On the first build the assets folder keeps empty but with the second build the folder contains the ttf files and my icon font starts working in release mode:
The screenshots shows the default MAUI App with the included fonts. The behavior is the same.
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
8.0.60 SR6
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: