Cannot access installed packages from another assembly

时间:2016-07-11 19:21:51

标签: visual-studio mvvm-light .net-assembly class-library

I have a UWP application that should be written in WPF. I am using MVVM approach and in my project I have a WPF project and 2 class libraries. One is for Model the other one is for ViewModel. I have installed MVVM Light framework in my ViewModel and added a reference from my View to my ViewModel. I am currently trying to make a navigation from one page to another but it seems that I dont have access to MVVM Light libraries from my View project. In UWP I don't have any issues with that. Can anyone explain to me what am I doing wrong? I just want to have access to libraries which are installed in class library which I have a reference.

1 个答案:

答案 0 :(得分:1)

You can't directly call a library referenced indirectly by another library from your application; you will need to add a reference to the "grandchild" library directly to the application.

Currently you have this:

Application -> LibraryA -> LibraryB

You will need to add another reference, like this:

Application -> LibraryA -> LibraryB

Application -> LibraryB