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

Crash trying to get Windows.UI.Xaml.Application.Current #158

Open
viniciusjarina opened this issue Apr 30, 2024 · 5 comments
Open

Crash trying to get Windows.UI.Xaml.Application.Current #158

viniciusjarina opened this issue Apr 30, 2024 · 5 comments
Assignees
Labels

Comments

@viniciusjarina
Copy link

First of all. Thank you. Great project. This should built-in on VS. I dunno why Microsoft don't invest more in the UWP tooling.

I am using your extension but for some reason my application crash on Initialize calling Windows.UI.Xaml.Application.Current with Catastrophic failure. Don't ask me why.

Screenshot 2024-04-29 at 8 39 39 PM

I removed the chunk

var executingAssemblyVar = new CodeVariableDeclarationStatement(typeof(string), "executingAssemblyName");
and I am using the codepath that uses only the static typeof and seems to be working fine.

Would be nice to have some option that doens't try to call Windows.UI.Xaml.Application.Current

Thank you

@christianhelle christianhelle self-assigned this Apr 30, 2024
@christianhelle
Copy link
Owner

@viniciusjarina thanks for taking the time to report this.

Do you mind sharing the Visual Studio and UWP version information?

@viniciusjarina
Copy link
Author

Microsoft Visual Studio Professional 2022
Version 17.9.6
VisualStudio.17.Release/17.9.6+34728.123
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Professional

Visual C++ 2022   00476-80000-00000-AA287
Microsoft Visual C++ 2022

Azure App Service Tools v3.0.0   17.9.199.22661
Azure App Service Tools v3.0.0

C# Tools   4.9.0-3.24121.1+a98c90d56455379836dd5c845b35fa932b00cfa3
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

NuGet Package Manager   6.9.2
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Visual Basic Tools   4.9.0-3.24121.1+a98c90d56455379836dd5c845b35fa932b00cfa3
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.9.0-beta.23614.3+a521e1cd420beb56c15faf6836184fadd2b7937a
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

XAML Styler   3.1
XAML Styler is a visual studio extension that formats XAML source code based on a set of styling rules. This tool can help you/your team maintain a better XAML coding style as well as a much better XAML readability.

@christianhelle
Copy link
Owner

@viniciusjarina Thanks for the version info. I'll see what I can do. I haven't touched this project or built UWP apps in years so the pace might be a bit slow 😄

@viniciusjarina
Copy link
Author

Oh no worries. I end up tweaking the .cs generated. I just reported to let you (and potentially other users) know.

@groberts-nr
Copy link

@christianhelle @viniciusjarina This is the same problem I ran into and should be fixed by #157 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants