mvvmlight icon indicating copy to clipboard operation
mvvmlight copied to clipboard

.NET Core Support

Open mysteryx93 opened this issue 4 years ago • 9 comments

When I add MvvmLight to a .NET Core project, I get this error

Warning NU1701 Package 'MvvmLightLibs 5.4.1.1' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project.

Has it been updated to work with .NET Core?

mysteryx93 avatar Apr 30 '20 00:04 mysteryx93

@mysteryx93 I believe you get .NET core support from the MvvmLightLibsStd10 (.NET Standard) package, however, it hasn't been updated since 2018 so might not give you the functionality you might like for WPF.

jamesmcroft avatar Apr 30 '20 07:04 jamesmcroft

Ah I see. Only problem is that GalaSoft.MvvmLight.CommandWpf won't be supported.

Or keep it with the .NET Framework version; it's working but it's just showing the warnings.

Also the code snippets plugin was never updated for Visual Studio 2019. Is there anyone still maintaining MvvmLight?

mysteryx93 avatar Apr 30 '20 14:04 mysteryx93

Until we get any official statement from Laurent, you could always try to (look for a) fork.

Another option is to try a similar library like Prism, which currently supports Wpf for .NETCoreApps

LentoMan avatar May 17 '20 15:05 LentoMan

.Net Core support would be great!

KevinBassaDevelopment avatar Sep 24 '20 08:09 KevinBassaDevelopment

I don't think there has been any official statement on whether MvvmLight is no longer going to be maintained.

There has been a bit of effort to breathe new life into MvvmLight through building a new MVVM framework within the Windows Community Toolkit.

The umbrella for this says Windows but don't worry. The MVVM Toolkit there which was inspired by the MvvmLight toolkit is platform agnostic.

jamesmcroft avatar Sep 24 '20 09:09 jamesmcroft

Sounds like an awesome initiative! I've looked at the other MVVM frameworks and I didn't find the extra features really useful for my specific needs. I prefer it does a basic job well.

A well-supported rewrite with better performance would be a double-plus!

mysteryx93 avatar Sep 24 '20 18:09 mysteryx93

Figured I'd follow-up here and say that we shipped our 7.0 version last month which includes the new MVVM Toolkit. You can find the notes on migrating from MVVM Light here: https://docs.microsoft.com/en-us/windows/communitytoolkit/mvvm/migratingfrommvvmlight and samples here: https://aka.ms/mvvmtoolkit/samples.

michael-hawker avatar Apr 23 '21 23:04 michael-hawker

Figured I'd follow-up here and say that we shipped our 7.0 version last month which includes the new MVVM Toolkit. You can find the notes on migrating from MVVM Light here: https://docs.microsoft.com/en-us/windows/communitytoolkit/mvvm/migratingfrommvvmlight and samples here: https://aka.ms/mvvmtoolkit/samples.

Does that work with WPF too?

luetm avatar Aug 30 '21 07:08 luetm

@luetm yes, the MVVM Toolkit is based on .NET Standard and works with WPF, UWP, Xamarin, Uno, MAUI, WinUI 3, etc...

michael-hawker avatar Aug 30 '21 14:08 michael-hawker