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

After using Prism + MVVM and publishing, the program cannot start #69

Open
alexinea opened this issue Oct 12, 2024 · 2 comments
Open

After using Prism + MVVM and publishing, the program cannot start #69

alexinea opened this issue Oct 12, 2024 · 2 comments

Comments

@alexinea
Copy link

In my WPF application, Prism and CommunityToolkit.Mvvm are used to operate a counter through the view model. When I don't use NetBeauty 2.0, the program can run normally in both Debug mode and Release mode. However, when I use NetBeauty 2.0 and publish the application, the program cannot start.

To confirm the correctness of the .csproj configuration I used, I used NetBeauty 2.0 in another blank .NET WPF project (and used exactly the same configuration), but without using Prism + CommunityToolkit.Mvvm. After publishing, I found that the application can work normally.

I am not sure whether there is a problem with my usage or there are some minor compatibility issues between NetBeauty 2.0 and MVVM.

So, asccording to the author's suggestion, I prepared a demo in order to reproduce this problem:

WPFNetBeautyDemo.zip

I wonder if there are other users who have encountered similar problems?

Thanks.

@liesauer
Copy link
Member

workaround here:

<BeautyExcludes>Prism</BeautyExcludes>

some assemblies must be inside the root dir and cannot be moved for some reasons, just like the wpf core assemblies.

need to debug inside the nbloader to find out why Prism works in this way.

if analyzed.Name == "PresentationCore.dll" || analyzed.Name == "PresentationFramework.dll" ||
analyzed.Name == "WindowsBase.dll" ||
analyzed.Name == "System.Xaml.dll" {
needRooted = true
}

@alexinea
Copy link
Author

Indeed, as you described, as long as Prism is excluded, the program can run normally.

thx a lot :P

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

No branches or pull requests

2 participants