Skip to content

Change MainWindow.cs to MauiProgram.cs#28751

Merged
guardrex merged 2 commits into
dotnet:mainfrom
thomasclaudiushuber:patch-4
Mar 23, 2023
Merged

Change MainWindow.cs to MauiProgram.cs#28751
guardrex merged 2 commits into
dotnet:mainfrom
thomasclaudiushuber:patch-4

Conversation

@thomasclaudiushuber
Copy link
Copy Markdown
Contributor

@thomasclaudiushuber thomasclaudiushuber commented Mar 23, 2023

Use the correct filename that contains the static CreateMauiApp method.


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/hybrid/security/index.md aspnetcore/blazor/hybrid/security/index

Use the correct filename that contains the static `CreateMauiApp` method.
@guardrex guardrex self-assigned this Mar 23, 2023
@guardrex
Copy link
Copy Markdown
Collaborator

Thanks @thomasclaudiushuber ... This is probably a recent change that I didn't hear about. Do you know when they made the change?

@thomasclaudiushuber
Copy link
Copy Markdown
Contributor Author

thomasclaudiushuber commented Mar 23, 2023

Hi @guardrex, in my opinion it's not a recent change, it has always been that way for .NET MAUI apps.

There was even never a MainWindow.cs file in MAUI. MAUI contains a MainPage.cs, but not a MainWindow.cs. But the code with the static CreateMauiProgram method was always in a MauiProgram.cs file, this is true for the .NET 6 and for the .NET 7 project template. I think MainWindow.cs was a copy/paste issue from something about WPF, because there that file exists.

Here is actually the anatomy of a .NET MAUI app that shows also the MauiProgram.cs file: https://learn.microsoft.com/en-us/dotnet/maui/xaml/fundamentals/get-started?view=net-maui-6.0

@guardrex
Copy link
Copy Markdown
Collaborator

guardrex commented Mar 23, 2023

Yes, I think you're correct. The rest of the docs use the correct filename. This is the only doc that seems to have a gremlin 😈 in it. It came in on this PR ... #25791 ... and that was derived from PU notes. I think that when I was writing it up I just flat-out had the wrong filename in my head 🙈. It was reviewed, but it wasn't caught by Javier at the time. That's how the sneaky ones 😈😈😈 really do well ... I put them in AND they escape review.

Stand-by for a sec ... I just need to make sure that they're all out of this before we merge it.

Copy link
Copy Markdown
Collaborator

@guardrex guardrex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @thomasclaudiushuber! 🚀 ... I think that gets them all.

@guardrex guardrex merged commit 48c6259 into dotnet:main Mar 23, 2023
@thomasclaudiushuber thomasclaudiushuber deleted the patch-4 branch March 23, 2023 19:58
@thomasclaudiushuber
Copy link
Copy Markdown
Contributor Author

Thank you @guardrex, looks good now. :)👍 ✨

Donciavas pushed a commit to Donciavas/AspNetCore.Docs that referenced this pull request Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants