Ay.
Ay.

Reputation: 41

MVVM Store App with Portable Class Library

I created a Portable Class Library and added the MVVM Light PCL to it.

PCL
--Model
----Term.cs

Term.cs contains a reference to GalaSoft.MvvmLight.

I also created a MVVM Store C# Application. I added a reference to the PCL above. However, when I build the project, I get the following errors:

Cannot resolve Assembly or Windows Metadata file 'GalaSoft.MvvmLight.dll' Type universe cannot resolve assembly: GalaSoft.MvvmLight, Version=4.0.23.23876, Culture=neutral, PublicKeyToken=null

If I remove the model class (Term.cs), the MVVM C# Application builds successfully?

I will appreciate any assistance in resolving this.

Upvotes: 4

Views: 823

Answers (1)

Claire Novotny
Claire Novotny

Reputation: 1701

Couple of things to check up front -- are you using NuGet >= 2.1? 2.2 was just released yesterday.

Are you using the Portable.MVVMLightLibs package from NuGet?

Do you have a reference to the Portable.MVVMLightLibs in your store app project? If you're deriving from ViewModelBase, then other projects that use it need a reference to the libraries that contain base types. That's regular .NET and has nothing to do with PCLs. If you add the package to your store app, does that resolve the issue?

Regards, Oren

Upvotes: 3

Related Questions