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

Missing XAML element content in release version but not debug version #17149

Open
vsfeedback opened this issue Aug 31, 2023 · 4 comments
Open
Assignees
Labels
area-xaml XAML, CSS, Triggers, Behaviors linker issues with objects being trimmed inappropriately (sub: perf) s/triaged Issue has been reviewed t/bug Something isn't working
Milestone

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


I have a working project (https://github.com/RodBarnes/NationalParks) where this is manifested. If I select "Debug" and select a target of either the Android SDK 31 emulator or my Samsung S10+ (Android 12) phone, the app deploys and runs correctly.

When I select "Release" and then deploy to either target, the app is successfully started but there are some XAML elements that do not display content. (See photos at bottom for comparison.) The only difference is whether selecting "Release" or "Debug" for the deployment.

Even more interesting: I killed the app on my phone and then restarted it and it then displayed all the content correctly, just like when deploying the "Debug" version. However, killing it on the emulator and restarting the app did not fix it there.

Steps to reproduce:

  1. Select "Debug" and an Android SDK 31 emulator as the target.
  2. Build and deploy the app.
  3. Tap the menu "hamburger", then tap "Parks".
  4. Note that both the title (e.g., Abraham Lincoln Birthplace) and the description (e.g., National Historic Park) are displayed.
  5. Tap the "Abraham Lincoln Birthplace" tile.
  6. Scroll down and tap "Topics" and "Activities". Both open and display the list of items.
  7. Stop the debug session.
  8. Select "Release" and the same Android SDK 31 emulator as the target.
  9. Repeat steps 2 thru 6 and note that the description (e.g., National Historic Park) is missing and the "Topics" and "Activities" open to the right size but the contents are not displayed.

I have also attached output logs:
Debug-Output-Build.txt
Debug-Output-Deploy.txt
Rrelease-Output-Build.txt
Release-Output-Deploy.txt

Debug_Park_list.png
Debug_Topics_Activities_lists.png
Release_Park_list.png
Release_Topics_Activities_lists.png


Original Comments

Feedback Bot on 2/22/2023, 06:37 PM:

(private comment, text removed)

Rod Barnes on 2/23/2023, 10:29 AM:

(private comment, text removed)

Rod Barnes on 3/1/2023, 04:42 PM:

(private comment, text removed)

Rod Barnes on 3/2/2023, 01:27 PM:

(private comment, text removed)

Feedback Bot on 5/31/2023, 11:20 PM:

(private comment, text removed)


Original Solutions

(no solutions)

@Eilon Eilon added the area-xaml XAML, CSS, Triggers, Behaviors label Aug 31, 2023
@samhouts samhouts added the t/bug Something isn't working label Aug 31, 2023
@samhouts
Copy link
Member

Probably similar/same as #16861

@samhouts samhouts added the linker issues with objects being trimmed inappropriately (sub: perf) label Aug 31, 2023
@Stedy59
Copy link

Stedy59 commented Aug 31, 2023

@samhouts This is what I am experiencing, maybe symptoms of the same problem...

  1. Create new MauiApp
  2. Clean
  3. Results:
    `Clean started...
    1>------ Clean started: Project: MauiApp1, Configuration: Debug Any CPU ------
    1>C:\Program Files\dotnet\sdk\8.0.100-preview.7.23376.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(314,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
    1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-rc.1.429\tools\Xamarin.Android.Common.targets(596,3): ### error XA1018: Specified AndroidManifest file does not exist: E:\Projects\Maui.Issues\MauiApp1\AndroidManifest.xml.
    1>Done building project "MauiApp1.csproj" -- FAILED.
    1>C:\Program Files\dotnet\sdk\8.0.100-preview.7.23376.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(314,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
    ========== Clean: 0 succeeded, 1 failed, 0 skipped ==========
    ========== Clean started at 12:51 PM and took 00.413 seconds ==========

Clean started at 12:51 PM and took 0.302 seconds`

Interesting that it is looking for the AndroidManifest there!

Then run it without compiling, it complains about a missing SplashScreen image on Windows... On Android, it attempts to deploy, and I get an "Object Reference Error"

If I recompile again, they both work.

Now, If I change from Debug to Release, the app will run in both instances, but the app icon, slashscreen images, including any other "Maui" resources I have included, WILL NOT be there.

I must recompile again, then all my resources will be there.

@StephaneDelcroix StephaneDelcroix self-assigned this Sep 12, 2023
@jaosnz-rep jaosnz-rep added the s/triaged Issue has been reviewed label Feb 26, 2024
@jfversluis jfversluis added this to the Backlog milestone Feb 27, 2024
@ghost
Copy link

ghost commented Feb 27, 2024

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@lpv-1902
Copy link

lpv-1902 commented Jan 8, 2025

Is there any workaround for this? We have been experiencing this a lot and it eventually costs us a lot of deployment hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-xaml XAML, CSS, Triggers, Behaviors linker issues with objects being trimmed inappropriately (sub: perf) s/triaged Issue has been reviewed t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants