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

The .NET MAUI base template project doesn't compile because resizetizer is not loading in the images from the csproj #14422

Closed
vsfeedback opened this issue Apr 5, 2023 · 6 comments
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working
Milestone

Comments

@vsfeedback
Copy link

vsfeedback commented Apr 5, 2023

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

Description

[severity:It bothers me. A fix would be nice]
It is due to an old bug that apparetly hasn't been fixed yet, the template references a default splashscreen image for the Windows platform but that splashscreen doesn't exist in the project resources, to fix it one must go to Platforms\Windows\Package.appxmanifest and delete the reference to the splashscreen, but it is really not user/beginner friendly at all.

Please fix the template project available on Visual Studio Community 2022 so the project compiles right off the bat, thanks :)

@Eilon Eilon added the area-templates Project templates, Item Templates for Blazor and MAUI label Apr 6, 2023
@Deus-nsf
Copy link

Deus-nsf commented Apr 6, 2023

Hello, I'm the guy who initially created the issue, after some troubleshooting, it seems that the issue is only present if you initially create an empty solution and then an MAUI project inside.
If instead you decide to create an MAUI project directly, even by not ticking "place solution and project in the same directory", then the issue doesn't occur.

Not the end of the world, but it can be confusing for people who likes to create empty solutions first (even though it's not as interesting as before since the directory option).

@samhouts samhouts added the t/bug Something isn't working label Apr 6, 2023
@samhouts
Copy link
Member

samhouts commented Apr 9, 2023

I ran into this one today myself doing exactly the same thing that @Deus-nsf commented: created a MAUI app in an existing solution and ran in Windows.

It's not just the splash screen. The dotnet bot wasn't there either.

To workaround it, I commented out the MauiImages and MauiSplashScreen in the csproj, built, and then uncommented again. This triggered resizetizer to handle those images.

@samhouts samhouts added area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer and removed area-templates Project templates, Item Templates for Blazor and MAUI labels Apr 9, 2023
@samhouts samhouts changed the title The .NET MAUI base template project doesn't compile The .NET MAUI base template project doesn't compile because resizetizer is not loading in the images from the csproj Apr 9, 2023
@jsuarezruiz jsuarezruiz added this to the Backlog milestone Apr 17, 2023
@mattleibow
Copy link
Member

mattleibow commented Apr 29, 2023

@Deus-nsf @samhouts

I can't repro on a clean machine and that app manifest is an old old one, so I am not sure what is going on. In net8 pre3 we switched back to project templates: bc83121 However we switched to solution templates in 6.0.100-rc1: 1831c94

This means that as of today, using the new project dialog may be pulling in some pre rc1 net6 templates??? If you can reproduce this, can you zip up the project that it creates so I can have a look and see if I can spot old things to confirm. Also, what type of machine is this? Clean or long standing, what SDKs do you have installed? What SDK are you using now to create projects?

The OG issue seemed to be the IDE could not run apps if there was no solution: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1377951

I think I can confirm the old templates if I can see it, I will also start the backport of the project templates so net6/net7 can have project template support.

@Zhanglirong-Winnie Zhanglirong-Winnie added s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version labels Oct 7, 2023
@ghost
Copy link

ghost commented Oct 7, 2023

Hi @vsfeedback. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

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.

@Zhanglirong-Winnie
Copy link

Verified this issue with Visual Studio Enterprise 17.8.0 Preview 2.0. Not repro on windows platform.

@ghost ghost closed this as completed Oct 14, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Nov 13, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants