Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

351
Views
.NET Framework 4.7 to .NET 5 Migration with Galasoft MVVMLight Library

We are migrating our WPF application to .NET 5.

Today we faced some problems with Galasoft Library named MVVMLight. We saw that there are no updates for .NET Standard. We cannot use a.e. EventToCommand class.

Do you know which options could we manage?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The regular MVVMLight and MVVMLightLibs NuGet packages are incompatible with .NET 5, they are only compatible with .NET Framwork and a few other platforms. However, there are dedicated packages for .NET Standard 1.0 which will work for .NET 5, too.

  • MVVMLightStd10
  • MVVMLightLibsStd10

You can read more about these versions on the offical MVVMLight web page here. Please be aware, that this version does not support the IServiceProvider interface.

One particular interface, IServiceProvider, which is used by the SimpleIoc component, is not available in .NET Standard 1.0. [...] the ServiceLocator class is not available anymore.

This affects SimpleIoC, which you have to get through the static SimpleIoc.Default member instead.

// OLD var nav = ServiceLocator.Current.GetInstance<INavigationService>();
// NEW
var nav = SimpleIoc.Default.GetInstance<INavigationService>();

An alternative is to use the the XamlBehaviors for WPF if you are searching for a repacement for EventToCommand. This is a library by Microsoft that replaces the legacy Blend behaviors.

You can install the NuGet package Microsoft.Xaml.Behaviors.Wpf, which is compatible with .NET Framework, .NET Core and .NET 5. The equivalent to EventToCommand there is InvokeCommandAction.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!