Adding references in a shared (.shproj) project

谁说我不能喝 提交于 2019-12-06 19:41:29

问题


I'm having an issue with adding a dll reference to a shared project. As seen in the picture below I have a Universal solution with a project for windows and a project for windows phone.

In the HubApp1.Shared project I need to add a reference for some code in Class.cs. I will be using Class.cs in both the Windows project and the Windows Phone project. I have scoured Bing for how to fix this and I couldn't find anything.


回答1:


You must add the reference in both WP and Windows project.

The reason for this is that shared project is not compiled into any output DLL - it is compiled into the project that references it, so it cannot reference any other project types except other Shared Projects.



来源:https://stackoverflow.com/questions/30029347/adding-references-in-a-shared-shproj-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!