问题
I'm trying to use Entity Framework Core with UWP. I found this sample from Microsoft and got it to work. In this sample, the object models are in a .Net Standard class library. However, for the project I'm working on, I need to be able to use MVVM Light's RaisePropertyChanged method in the setters of my object models. The issue I'm running into is that MVVM Light is apparently not compatible with .NET Standard 2.0, only 1.0.
MVVM Light does seem to install correctly to the class library,
but when I try to add a using statement it doesn't work: using GalaSoft.MvvmLight;
gives me a "The type or namespace GalaSoft could not be found." (I did also try without "GalaSoft.")
I've tried everything I can think of, and this really has me stumped. Is there any way that I can use MVVM Light with UWP and Entity Framework Core?
回答1:
.NET Standard versions are always backwards compatible, so MVVM Light being .NET Standard 1.0, it makes it fully compatible with .NET Standard 2.0 libraries. You must use the .NET Standard version of MVVM Light which is here: https://www.nuget.org/packages/MvvmLightLibsStd10/
来源:https://stackoverflow.com/questions/55124254/is-it-possible-to-use-mvvm-light-with-entity-framework-core-in-a-uwp-project