I know, someone asked here but rules here don't allow me to ask questions in comments, so I make second topic to ask if someone changed? Anyone know anything about that?
Now.
- Installed Visual Studio 2017.
- Created new WPF project.
- Installed the Mvvm Light 5.3.0 package.
- Tried to compile and:
I can choose it (!):
So, I've tried:
- First link - it didn't work, tried both of them, still same error.
- Second link - it didn't work too, I don't have app on network use. I checked also all of namespace names and rebuilded and rebooted pc and reopened visual studio
- Third link - this link doesn't matter, becouse I can't compile solution.
- Fourth link - also opened with admin rights.
- Fifth link - changing platform didn't take effect.
- Sixth link - all fields etc. were checked.
For additional information, I downloaded some of free MVVM light examples from google and NONE of them worked.
Code (I post it here only because last time I asked this question it was the problem with no source code included):
ViewModelLocator.cs basic for Mvvm light
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Ioc;
using Microsoft.Practices.ServiceLocation;
namespace MLXI.ViewModel
{
public class ViewModelLocator
{
public ViewModelLocator()
{
ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
SimpleIoc.Default.Register<MainViewModel>();
}
public MainViewModel Main
{
get
{
return ServiceLocator.Current.GetInstance<MainViewModel>();
}
}
public static void Cleanup()
{
// TODO Clear the ViewModels
}
}
}
And MainViewModel.cs basic for MvvmLight
using GalaSoft.MvvmLight;
namespace MLXI.ViewModel
{
public class MainViewModel : ViewModelBase
{
public MainViewModel()
{
}
}
}
MainWindow.xaml
<Window x:Class="MLXI.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:MLXI"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
</Grid>
</Window>
I really just wanted to make simple app in WPF. Anyone has any idea?