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

Deployment error 0700 when building as Windows app #3542

Closed
marwalsch opened this issue Nov 24, 2021 · 15 comments
Closed

Deployment error 0700 when building as Windows app #3542

marwalsch opened this issue Nov 24, 2021 · 15 comments
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) platform/windows 🪟 t/bug Something isn't working

Comments

@marwalsch
Copy link

Description

When using the Blazor bindings template, attempting to run the app on a windows machine throws an error complaining about a missing splash screen. The package name is a cryptic string.
Possibly related issue.

Steps to Reproduce

  1. Create a Blazor project in the VS 2022 17.1 preview.
  2. Try to deply on windows machine.

Version with bug

Preview 10 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows 10.0.17763.0

Did you find any workaround?

No.

Relevant log output

DEP0700: Registration of the app failed. [0x80073CF6] AppxManifest.xml(33,27): error 0x80070002: Cannot install or update package D1EABA91-12B1-4A84-AF36-***************** because the splash screen image [appiconfgSplashScreen.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.
@marwalsch marwalsch added the t/bug Something isn't working label Nov 24, 2021
@Eilon
Copy link
Member

Eilon commented Nov 29, 2021

@marwalsch does this work with the non-Blazor MAUI template?

@Eilon Eilon added the area-blazor Blazor Hybrid / Desktop, BlazorWebView label Nov 29, 2021
@dos-ise
Copy link

dos-ise commented Nov 30, 2021

I have the same problem with the non-Blazor MAUI template.

@marwalsch
Copy link
Author

@Eilon I can't seem to be able to reproduce with the Blazor template any more. Might this have been silently fixed in the latest patch release of the VS2022 preview?

@Eilon Eilon added area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) and removed area-blazor Blazor Hybrid / Desktop, BlazorWebView labels Nov 30, 2021
@Eilon
Copy link
Member

Eilon commented Nov 30, 2021

If it's just the splash screen, I happened to see what I think was the exact same error in another app, and this was the workaround:

It compiles fine for Android. But on Windows it builds, then can't deploy the app because it can't find the specified splash screen file.

To fix this, in the .../mauiapp/Platforms/Windows/Package.appxmanifest, I changed:

        <uap:SplashScreen Image="Assets\appiconfgSplashScreen.png" />

To:

        <uap:SplashScreen Image="Assets\splashSplashScreen.png" />

Because that file seems to be the one configured as the MauiSplashScreen asset in the project in the CSPROJ:

		<!-- App Icon -->
		<MauiImage Include="Resources\appicon.svg" ForegroundFile="Resources\appiconfg.svg" IsAppIcon="true" Color="#C00CC0" />

		<!-- Splash Screen -->
		<MauiSplashScreen Include="Resources\splash.svg" Color="#C00CC0" />

And so maybe this was a bug in some version of the templates, that has since been fixed? Can anyone reproduce this in the latest templates? I've done a lot of publishing tests with the latest templates and haven't seen this issue at all.

@marwalsch
Copy link
Author

Can't reproduce anymore on neither the Blazor nor XAML template; tested on Android Simulator on windows. I'll leave the issue open in case @dos-ise has additional feedback.

@dos-ise
Copy link

dos-ise commented Dec 2, 2021

You are correct. Fixing the file name in the Package.appxmanifest solved the problem for me. Thanks alot

@Eilon
Copy link
Member

Eilon commented Dec 2, 2021

OK, closing this. This might have been a bug in the template at some point but it looks like it's fixed for everyone!

@Eilon Eilon closed this as completed Dec 2, 2021
@ColonelDuddits
Copy link

This error still occurs for me. As far as I know, I'm using the latest preview (or at least it says it's up to date when I try to update it).
For what it's worth, the error does not occur when I create the Maui Blazor project as part of a new solution. It only occurs when I add a Maui project to an existing solution.

@Eilon
Copy link
Member

Eilon commented Dec 5, 2021

@ColonelDuddits does the error go away if you do the workaround mentioned above in the appxmanifest file?

@mikegoatly
Copy link

@Eilon I've just got this error in a new MAUI project. I created it using the Visual Studio 2022 (17.1.0 Preview 6.0) add project dialog, adding to an existing solution, as @ColonelDuddits mentioned.

The workaround didn't work for me, so I did a bit more digging.

I noticed that if I opened the csproj file straight after creation, the ItemGroup containing the resources looked correct, but after a few seconds, something was rewriting the content without any interaction from me. Specifically I observed the this:

	<ItemGroup>
		<!-- App Icon -->
		<MauiIcon Include="Resources\appicon.svg" ForegroundFile="Resources\appiconfg.svg" Color="#512BD4" />

		<!-- Splash Screen -->
		<MauiSplashScreen Include="Resources\appiconfg.svg" Color="#512BD4" />

		<!-- Images -->
		<MauiImage Include="Resources\Images\*" />

		<!-- Custom Fonts -->
		<MauiFont Include="Resources\Fonts\*" />
	</ItemGroup>

rewritten to:

	<ItemGroup>
		<!-- App Icon -->
		<AndroidResource Include="Resources\appicon.svg" ForegroundFile="Resources\appiconfg.svg" Color="#512BD4" />

		<!-- Splash Screen -->
		<AndroidResource Include="Resources\appiconfg.svg" Color="#512BD4" />

		<!-- Images -->
		<MauiImage Include="Resources\Images\*" />

		<!-- Custom Fonts -->
		<MauiFont Include="Resources\Fonts\*" />

	</ItemGroup>

My gut feeling was that some extension was misbehaving, so I disabled the obvious ones I could see in the list: Xamarin.Android SDK, Xamarin.Apple SDK and Uno Platform Solution Templates. After disabling these, the csproj no longer got rewritten and everything published fine after creating a new project.

Unfortunately (for testing purposes), everything still worked fine after I re-enabled the extensions, so I can't troubleshoot further, but perhaps this might help someone else.

@Eilon
Copy link
Member

Eilon commented Feb 10, 2022

@mikegoatly - that definitely doesn't look right and shouldn't happen. Can you file that in a new issue so that we can track it?

@Mephisztoe
Copy link

Mephisztoe commented Feb 18, 2022

Same problem here.

My .csproj contains these lines:

<MauiSplashScreen Include="Resources\appiconfg.svg" Color="#3064CE" />

While my Package.appxmanifest file contains this:
<uap:SplashScreen Image="Assets\appiconfgSplashScreen.png" />

When I try to deploy the app on my Windows Machine, I get this:

"DEP0700: Fehler beim Registrieren der App. [0x80073CF6] AppxManifest.xml(33,27): Fehler 0x80070003: Das Paket "8496B0C3-46D4-4C37-8FEF-A012F717C268_9zz4h110yvjzm" kann nicht installiert oder aktualisiert werden, da das Begrüßungsbildschirmbild [appiconfgSplashScreen.png] nicht geladen werden kann. Überprüfen Sie, ob das Paket ein Bild enthält, das als Begrüßungsbildschirm für die Anwendung verwendet werden kann, und ob das Paketmanifest auf den richtigen Speicherort des Begrüßungsbildschirmbilds im Paket verweist." (sorry for german translation)

I did a search for *splash*.png within the bin/Debug folder and found a couple of appiconfgSplashScreen images right within the root folder that also contains all compiled DLLs.

They follow this naming-scheme:

appiconfgSplashScreen.scale-[nnn].png

There are 5 of them:

  • appiconfgSplashScreen.scale-[100].png
  • appiconfgSplashScreen.scale-[125].png
  • appiconfgSplashScreen.scale-[150].png
  • appiconfgSplashScreen.scale-[200].png
  • appiconfgSplashScreen.scale-[400].png

For testing purposes, I edited the Package.appxmanifest file and removed the folder from the file reference:

<uap:SplashScreen Image="appiconfgSplashScreen.png" />

Now the app gets deployed and executed. However, no splash screen rendered.

Also I noted, that every other appearance of any image such as the Logo or the Tile also reference respective generated PNGs within the Assets folder that does not seem to exist. Thus, when executed, the apps' icon in the taskbar is also empty. When I remove the "Assets" folder reference in the properties, the taskbar shows the correct image.

Also, I didn't find out, what setting is responsible for the windows' titlebar icon on the top left.
This one is always set to default.

[UPDATE] I just updated my maui workloads to preview 12 and now the AppIcon as well as the SplashScreen are deployed to the Assets subfolder.

@MichaelLant
Copy link

I have also been experiencing this problem. I am on the latest preview build. I relocated an included project to a different folder and that is when the problem started. I was able to resolve the issue in the same way that @Mephisztoe resolved the problem - by removing the reference to the Assets/ folder.

@Dbquity
Copy link

Dbquity commented Feb 20, 2022

I found the same issue and workaround as @Mephisztoe and @MichaelLant after upgrading to VS 2022 17.2.0 preview 1 / MAUI preview 13 from the latest preview of VS 2022 17.1.0 and MAUI preview 12.
With the project templates from MAUI preview 13, the reference to the Assets\ subfolder are gone from the Package.appxmanifest, and a line about raw assets is added to the .csproj file in the ItemGroup that contains the MauiIcon, MauiSplashScreen, MauiImage, MauiFont tags:

<ItemGroup>
  ...
  <!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
  <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

(Btw, I needed to explicitly update the templates using
dotnet new --install Microsoft.Maui.Templates::6.0.200-preview.13.2865
for whatever reason, just upgrading the VS preview didn't update the templates)

@Eilon
Copy link
Member

Eilon commented Feb 21, 2022

Folks - if you're having any issues please make sure there is an open issue tracking it. This issue is closed and is unlikely to get a response from the dev team.

@ghost ghost locked as resolved and limited conversation to collaborators Mar 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants