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

Separate Prism.Interactivity into separate packge #2900

Open
znakeeye opened this issue Jun 30, 2023 · 1 comment
Open

Separate Prism.Interactivity into separate packge #2900

znakeeye opened this issue Jun 30, 2023 · 1 comment

Comments

@znakeeye
Copy link
Contributor

Description

Prism.Wpf incorrectly enforces a dependency to Microsoft.Xaml.Behaviors.dll. This dll is optional! In our deployed software, we have always deleted this file since we never use the interaction stuff.

In many cases, this mistake implies a 143 kB bloat for nothing. Maybe related to #1492 where you seem to have re-introduced this error.

Not sure where Prism depends on Microsoft.Xaml.Behaviors, but those parts should probably go into a separate package. E.g.:

<PackageReference Include="Prism.Wpf" />
<PackageReference Include="Prism.Wpf.Behaviors" />

Or maybe just exclude the Microsoft.Xaml.Behaviors and encourage consumers to add it if necessary?

Steps to Reproduce

  1. Create a WPF project.
  2. Add <PackageReference Include="Prism.Wpf" Version="8.1.97" />
  3. Build
  4. Inspect build output.

Expected: Microsoft.Xaml.Behaviors.dll should not be present
Actual: Microsoft.Xaml.Behaviors.dll is present

Platform with bug

WPF

Affected platforms

Windows

Did you find any workaround?

A custom build step deletes Microsoft.Xaml.Behaviors.dll before deployment. Not so nice...

Relevant log output

No response

@brianlagunas
Copy link
Member

This is not a bug. Prism does depend on Microsoft behaviors and has always had a dependency on the Microsoft behaviors. If you were to try and use the InvokeCommandAction and did not have this reference, your application would crash.

I would also argue that 143KB in a WPF app is not even close to what someone should consider as "bloat".

I will leave this open as a feature request, but you would have to provide an argument for creating a breaking change for all existing Prism users. Keeping in mind that this kind of breaking change is the worst kind because the fix is not obvious.

@brianlagunas brianlagunas changed the title Prism bloated with Microsoft.Xaml.Behaviors Separate Prism.Interactivity into separate packge Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants