0

I have a Blazor server-side app (.Net 6). This app was working without problem until now. I have updated my Visual studio to V2022. After cleaning, rebuilding and publishing the project (to local directory on the same server) without any errors, my app is working in general. But just on two pages where I have used a nuget package "PSC.Blazor.Components.Chartjs" (V6.0.29). I get an error when the page is opened.

MissingMethodException: Method not found: 
'Void PSC.Blazor.Components.Chartjs.Models.Common.Legend.set_Align(System.String)'

What could be the problem? My target framework is set to .net 6.0.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Mdarende
  • 469
  • 3
  • 13
  • 1
    wrong (read no) version if the package/dll, see: https://stackoverflow.com/a/36344325/724039 – Luuk May 16 '23 at 12:32
  • @Luuk I have tried to install newer versions of the package (6.0.X > 6.0.29) But each time I get compiling errors. Just on the curren version project is compiled without errors. – Mdarende May 16 '23 at 12:47
  • 1
    I would use the same version of the package that is working on your old VS installation. (only upgrade 1 thing at a time, in this case Visual Studio) – Luuk May 16 '23 at 12:59
  • 1
    This may not be related to your issue, but when using a different version of Visual Studio ensure that you're using the same NuGet _Package Management_ setting. Tools => Options... => NuGet Package Manager => General = Default package management format. Also see [Migrate from packages.config to PackageReference](https://learn.microsoft.com/en-us/nuget/consume-packages/migrate-packages-config-to-package-reference) – Tu deschizi eu inchid May 16 '23 at 15:54

0 Answers0