dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.01k stars 1.72k forks source link

Failure Building Due to Splash Screen Image splashSplashScreen.png #15515

Closed DamianSuess closed 1 month ago

DamianSuess commented 1 year ago

Description

Unable to build the project after cleaning the project or first building after cloning the repository. The project platforms enabled are Android and UWP/WinUI. The splash screen is the same one used by the MAUI template project shipped with Visual Studio 2022

DEP0700: Registration of the app failed. [0x80073CF6] AppxManifest.xml(34,27): error 0x80070002: Cannot install or update package XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX_YYYYYYYYYYYYY because the splash screen image [splashSplashScreen.png] cannot be located. Verify that the package contains an image that can be used as a splash screen for the application, and that the package manifest points to the correct location in the package where this splash screen image can be found.
18:08:27:166

Steps to Reproduce

  1. Clean project in Visual Studio
  2. Remove obj and bin (output) folders
  3. Rebuild project

Link to public reproduction project repository

(NA)

Version with bug

7.0.86

Last version that worked well

7.0.86

Affected platforms

Android, Windows

Affected platform versions

Android 5.0 (21) and up, Windows SDK 10.0.19041.0

Did you find any workaround?

Clean, build, clean, build, (rewind/repeat)

Relevant log output

18:08:25:249    Creating a new clean layout...
18:08:25:304    Copying files: Total 207 mb to layout...
18:08:26:035    Checking whether required frameworks are installed...
18:08:26:085    Registering the application to run from layout...
18:08:27:051    DEP0700: Registration of the app failed. [0x80073CF6] AppxManifest.xml(34,27): error 0x80070002: Cannot install or update package b236464f-3896-4247-bb90-54210b978f5f_9zz4h110yvjzm because the splash screen image [splashSplashScreen.png] cannot be located. Verify that the package contains an image that can be used as a splash screen for the application, and that the package manifest points to the correct location in the package where this splash screen image can be found.
18:08:27:166    1>Deployment of the application to the target device failed.
18:08:27:188    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
18:08:27:188    ========== Deploy started at 6:08 PM and took 03.382 seconds ==========
ghost commented 1 year ago

Hi @DamianSuess. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

DamianSuess commented 1 year ago

Thanks for the heads up, this should be pretty straightforward. It's reproducible with the base MAUI Template application.

mstefarov commented 1 year ago

I was seeing the same problem deploying this solution: https://github.com/Esri/arcgis-maps-sdk-dotnet-demos/tree/main/src/MauiSignin

I was able to get past this problem by closing VS, deleting bin/obj/.vs folders, then rebuilding. I think I had some temp files left over from a previous version of VS/MAUI that were preventing successful deployment.

ozersenol commented 1 year ago

I could reproduce this problem by simply commenting out line for MauiSplashScreen on.csproj file and tried to build app on Windows platform. On android I have not got this isuue. Then I put it back and boom... solved!

DamianSuess commented 1 year ago

Thank you @ozersenol for verifying this, now I know I'm not going crazy. I tried the same approach and didn't know if that was an accident or not.

DamianSuess commented 1 year ago

As per another example, when I attempted to build the MAUI sample project for LiveCharts2, I get the same exact error message about splashSplashScreen.png. Reproducing was simple, pulled back the project and launch their .NET MAUI solution, setting the target to Windows.

Workaround

Build > Clean in VS2022 didn't solve the issue, the only workaround I found to work was to delete all bin and obj folders and rebuild.

Error in Output

DEP0700: Registration of the app failed. [0x80073CF6] AppxManifest.xml(33,27): error 0x80070002: Cannot install or update package e0049276-8cb3-4a16-85d6-8dd07de43eb8_9zz4h110yvjzm because the splash screen image [splashSplashScreen.png] cannot be located. Verify that the package contains an image that can be used as a splash screen for the application, and that the package manifest points to the correct location in the package where this splash screen image can be found.    MauiSample          
IndianaGary commented 1 year ago

I can confirm that this issue STILL OCCURS in .NET 8.0 Maui Preview 7.

japarson commented 1 year ago

@mattleibow There might be some issue in resizeitizer causing this. https://github.com/dotnet/maui/blob/972b15ed45db627596b3ec0dd206e74624d3689f/src/SingleProject/Resizetizer/src/nuget/buildTransitive/Microsoft.Maui.Resizetizer.After.targets#L477C57-L477C57

tylerdickerson commented 11 months ago

This issue persists in the latest Visual Studio 2022 v17.7.5 release with MAUI workload v7.0.96 on .NET 7, even after uninstalling and re-installing the newest MAUI templates.

The workaround suggested by @mstefarov and @DamianSuess works for me in the mean time.

mattleibow commented 9 months ago

A fair bit of work to make the asset processing better in .NET 8. I think this is fixed now, but is anyone still seeing this in .NET 8?

ghost commented 9 months ago

Hi @DamianSuess. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ozersenol commented 9 months ago

Hi @mattleibow I checked with clean project and I sadly confirm that this issue has not been solved by .Net 8.0, yet.

I created clean project with .Net 8 and removed line related o splash screen and tried to debug, it gives error:

Registration of the app failed. [0x80073CF6] AppxManifest.xml(34,27): error 0x80070002: Cannot install or update package com.companyname.mauiapp2_9zz4h110yvjzm because the splash screen image [$placeholder$.png] cannot be located. Verify that the package contains an image that can be used as a splash screen for the application, and that the package manifest points to the correct location in the package where this splash screen image can be found.

mattleibow commented 9 months ago

@ozersenol if you just removed the splashscreen from the csproj, you also need to remove it from the appxmanifest. When making changes to splash screens or icons you need to update manifests as resizetizer just does generation and does not do everything.

ghost commented 9 months ago

Hi @DamianSuess. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost commented 9 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

axa88 commented 9 months ago

A fair bit of work to make the asset processing better in .NET 8. I think this is fixed now, but is anyone still seeing this in .NET 8?

I am. Upon updating to .NET 8

BretJohnson commented 1 month ago

I'm reopening as this problem still happens. Three of us have seen it recently. For MS employees see Teams thread here with more info: https://teams.microsoft.com/l/message/19:989ffa44998147aca4ceaf7482967668@thread.skype/1722547790359?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&groupId=0056f60b-301f-43ac-bbcf-f356d3c42c92&parentMessageId=1722444364651&teamName=VS%20Client%20Experiences&channelName=MAUI%20%F0%9F%8C%BA&createdTime=1722547790359. That said, we haven't gotten a consistent repro yet, as it goes away on rebuild.