The type or namespace name 'Practices' does not exist in the namespace 'Microsoft'

Jun 2, 2014 at 12:45 PM
Since updating my universal app project to 4.4 I get this error in the Windows 8 project. Windows Phone compiles fine however. I'm guessing I've missed something?
Jun 9, 2014 at 6:28 PM
Edited Jun 9, 2014 at 6:42 PM
I'm having a very similar issue. I've been developing a Windows 8.1 app and have been getting the same warning in my App.xaml file (using version 4.4). The app works fine so I didn't think much of it until I tried working in Blend and was blocked because of the error.

I decided to create a completely new app to see if I had done something wrong. As soon as I open the App.xaml file in the new project, there's a warning stating 'The name "ViewModelLocator" does not exist in the namespace "using:MvvmLight1.ViewModel".
Jun 11, 2014 at 1:56 AM
Hi realworld666,

I don't know if this will help you at all, but I figured out why I was getting 'The name "ViewModelLocator" does not exist in the namespace "using:MvvmLight1.ViewModel.

It had to do with the Platform target in the project settings. When targeting anything but 'Any CPU' or 'x86', I receive the error. Perhaps the Practices .dll behaves the same. Hope this helps.
Aug 18, 2014 at 4:09 PM
There is a missing reference to Microsoft.Practices.ServiceLocation. I just installed MvvmLight to a new project and it compiled fine. The reference was there. I then did the NuGet updates to two packages needing updates (CommonServiceLocator and MVVM Light libraries only) and that is when the reference disappeared.

I found the reference in the packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\ folder and added that reference to fix the error.

I am not sure this is the right solution but hopefully it is and the NuGet installation should be fixed to resolve the missing (changed) reference.