-
Notifications
You must be signed in to change notification settings - Fork 311
Microsoft.Practices.ServiceLocation changed to CommonServiceLocator #28
Comments
Hi,
Until. I publish a new template, the process is to update to the new MVVM Light Libs version and to fix the compilation errors according to
Http://mvvml<http://mvvmlught>ight.net/std10
Let me know if that doesn't work for you.
Thanks
Laurent
Laurent Bugnion, Microsoft- +41 79 537 78 08
…________________________________
From: raceybe <notifications@github.com>
Sent: Sunday, March 25, 2018 01:53
To: lbugnion/mvvmlight
Cc: Subscribed
Subject: [lbugnion/mvvmlight] Microsoft.Practices.ServiceLocation changed to CommonServiceLocator (#28)
I don't know if this is a real issue or not, since I am completely new to mvvmlight.
The New Project template references Microsoft.Practices.ServiceLocation whereas the updated CommonServiceLocator assembly is called just that. It appears that the assembly was renamed for version 2.0.0+?
Can the New Project template for mvvmlight be updated to reflect this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#28>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AEscWcW7cXdO8MO2_vFvjsLnmYmOzrm1ks5thuqGgaJpZM4S59sj>.
|
Updating It failed to update the |
Any update on this? I just tried adding MVVMLight to a brand new WPF app in Visual Studio 2017 - updated the nuget packages to the latest release: Severity Code Description Project File Line Suppression State |
Packages I have: package id="CommonServiceLocator" version="2.0.4" targetFramework="net471" |
This is doesn't just happen with the template though. This happens on any project to which the nuget MvvmLight package is installed, not just the [...]LibsStd10 packages as per the link. I just installed the latest stable version (5.4.1.1 at writing) of the MvvmLight package from nuget to an existing WPF project and had the same error come up as the OP. I could only get the project to compile by downgrading the CommonServiceLocator dependency package to version to 1.3.0 as described in this MSDN forum post. |
Ty this worked for me for the same issue. |
I'm new to C# and MVVM Light. I just started a new project with MVVMLight and I fixed the error by using CommonServiceLocator which seem to include 'ServiceLocator'. Here are my dependecies in the file
|
2.You can try to downgrade(Uninstall , Reinstall) MvvMLight and dependencies (Libs and CommonServiceLocator) for something like MvvMLight 5.3.0 and CommonServiceLocator 1.3.0 like this post 3.You can search for an alternative to MvvmLight (React , MvvmCross, Prism), I recommend MvvmCross wich seems to have more docs (very useful for beginner don't be afraid of it) and more community support, Pls correct me if I'm wrong for this last point. |
This was a breaking change in the CommonServiceLocator package in an incremental version and isn't particularly an issue with MvvmLight. The fix for this is to change your using Microsoft.Practices.ServiceLocation; to using CommonServiceLocator; This will fix the problems. You can find more information on this change in the CommonServiceLocator change history (unitycontainer/commonservicelocator@908a30f#diff-af172358836574e0cedcd1939bd9092b) |
I'm still facing this issue. Steps:
|
I don't know if this is a real issue or not, since I am completely new to mvvmlight.
The New Project template references Microsoft.Practices.ServiceLocation whereas the updated CommonServiceLocator assembly is called just that. It appears that the assembly was renamed for version 2.0.0+?
Can the New Project template for mvvmlight be updated to reflect this?
The text was updated successfully, but these errors were encountered: