Reputation: 1760
In my Blazor Server project I have been using blazorise controls. I started this project 3 months before. Now I wanted to use Blazorise.Snackbar component. So I ran nuget package command to install the component. Now my project is not running. It shows exception in the below lines of code in the Program.cs file
builder.Services.AddBlazorise(options => { options.Immediate = false; })
.AddBootstrap5Providers()
.AddFontAwesomeIcons()
.AddBlazoriseRichTextEdit();
The error message is:
System.TypeLoadException: 'Method 'FocusTrap' in type 'Blazorise.Bootstrap5.Bootstrap5ClassProvider' from assembly 'Blazorise.Bootstrap5, Version=1.0.4.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.'
Can anyone help me to solve the problem?
Upvotes: 2
Views: 952
Reputation: 11312
You should use the same version on all Blazorise
packages to ensure that they are compatible with each other. Changing Blazorise.Snackbar
version to 1.0.4
will fix your problem.
Upvotes: 4