I'm building a class library with some utility functions that any of my projects can access. I need to be able to use some classes within the System.Net
namespace, like WebHeaderCollection
. Unfortunately, Visual Studio doesn't find them, and doesn't give me the option to resolve them by adding the correct using directive.
Not even after explicitly having added System.Net
does it find the reference. What am I doing wrong?
UPDATE:
I solved the problem. I had created a Class Library (Package) (used for NuGet, where you edit the references in
project.json
instead of going theAdd Reference...
route). This time I created a regular Class Library (in the Windows category) instead and references now work like a charm.