0

I am working with an WPF MVVM application.

My code look like : View:

<Window x:Class="MVVMDemo.View.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cinch="clr-namespace:Cinch;assembly=Cinch.WPF"
xmlns:meffed="http:\\www.codeplex.com\MEFedMVVM"
meffed:ViewModelLocator.ViewModel="AdditionViewModel"
Title="MainWindow" Height="300" Width="300">

ViewModel :

.
.
.
using Cinch;
using MEFedMVVM.ViewModelLocator;
namespace MVVMDemo.ViewModel 
{
[ExportViewModel("AdditionViewModel")]
public class AdditionViewModel : ObservableCollection<Addition> , INotifyPropertyChanged 
{
.
.
.
[ImportingConstructor]
public AdditionViewModel()
{
UpdateCommand = new GetAdditionCommand(this);
LoadGrid = new SimpleCommand<object, object>(OnLoadGrid);
}

But At [ExportViewModel("AdditionViewModel")] I am getting error as "MEFefMVVM.ViewModelLocator.ExportViewModel is not an attribute class"

Please help.

Thanks Anu

anu takle
  • 1
  • 1
  • 2

1 Answers1

0

I was missing reference of using System.ComponentModel.Composition;

anu takle
  • 1
  • 1
  • 2