Reputation: 469
I'm using Visualstudio 2017 and need to add a reference for System.IO.Ports
. However I can't find the Add Reference option (in any right-click menu in the solution explorer) nor instructions on how to do this. Help please? Thank you
Upvotes: 8
Views: 17372
Reputation: 1
I had the same problem after upgrading to Visual Studio Community 2019 Version 16.11.41 en adding a Unity Test Framework test. Before, everything was ok. Add reference is NOT shown:
For me, I could get past by the problem by the following steps: -select the project in the solution explorer -From the top menu, Choose project<myproject>properties (add reference is not shown) -select again from the top menu project --> add reference is now shown
This seems to be a VS or a VS-Unity combination problem. I also miss the project\application option and no project properties are shown
Upvotes: 0
Reputation: 66
In my case, I used NuGet Packages. This solution is half working, but you can add reference to most popular libraries.
Upvotes: 0
Reputation: 129
When you create a new project you can choose several templates of c# application. If you select "Console App (.NET Framework)" you will be able to add references But if you select "Console App (.NET Core)" there will be no reference tab
After project is created you can check it via "Project properties" / Application / Target Framework:
".NET Core 2.0" (has no references) or ".NET Framework 4.6.1" (has preferences)
As far as I understand in your case the most simple solution is to create new project and to copy you code into it.
Upvotes: 11
Reputation: 704
The steps to Add a Reference in Visual Studio is:
Go to the Project option in the top toolbar.
Add Reference option(Roughly the 10th option from top).
In the reference manager choose the appropriate reference that you want.
I am using Visual Studio 2015 community edition but I believe the process is same for 2017 edition.
Upvotes: -2