问题
I am trying to wrap extra functionality around json.net (Newtonsoft.Json nuget) into class library Json:
The problem: adding Json reference to Test doesn't add references to nuget auto-magically. The idea is to add reference to Json in multiple solutions afterwards. But I am only able to access Json types, Json.net namespaces aren't available.
Point is: I reference Json, reference to Json is added, json.dll and Newtonsoft.Json.dll get copied on build, but Newtonsoft.Json.dll is not referenced automatically.
I can solve the problem manually by: 1) adding references to all dlls referenced in Json into Test 2) adding nuget into Test. But I don't like either of them.
My question: what is the correct way to do what I want? Perhaps my idea of wrapping json.net is wrong? And nugets aren't designed to be used like this...
来源:https://stackoverflow.com/questions/36477275/how-to-reference-project-with-nuget