0

I have just done an Aspnet class library project using Yeoman aspnet generator.
Now I would like to reference this project from a console one.
I can't find the way to reference the other project (probably only the DLL). I am on Mac with Visual Studio Code... and the terminal

https://www.microsoft.com/net/core#macos

Mino
  • 635
  • 10
  • 28

1 Answers1

-1

Start by adding the DLL into the references section of the project. In every Visual Studio project there is an expandable feature in the Solution Explorer called References.

Once you have added the DLL as a reference you will then probably need to include it in code by using the using statement at the top of your code:

Using MyClass;

GrahamJ
  • 528
  • 4
  • 15
  • 1
    He's using visual studio code. It doesn't have a solution explorer – mnsr Jun 29 '16 at 13:52
  • Ah - I had forgotten or not noticed this though I do have code on my PC. Then my advice for him if he wants to start referencing DLLs is to get Visual Studio Community Edition, which will probably teach him a lot more anyway. – GrahamJ Jun 29 '16 at 14:03
  • As I said, I am on a Mac and I would like to use Visual Studio Code or just to know what Visual Studio does to your project.json file when you reference a local dll? – Mino Jun 29 '16 at 15:37
  • To try and atone for my sins, here is another StackOverflow question which appears to give you the answers about project.json: http://stackoverflow.com/questions/31888274/how-to-reference-assemblies-using-visual-studio-code – GrahamJ Jun 29 '16 at 16:09
  • Incidentally i cannot see anything about Visual Studio Community edition for Mac, which i guess is a bit of a bummer for Mac developers. I know some of the guys I work with use Windows VMs on heir Macs to develop with Visual Studio. – GrahamJ Jun 29 '16 at 16:11
  • I know Visual Studio, but I was interested in the latest Microsoft release and I was experimenting... I will come back when it will be better documented. Thanks. – Mino Jun 29 '16 at 20:33