SF1
SF1

Reputation: 469

Add Reference option missing from Solution Explorer

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

Answers (4)

Weirda
Weirda

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:

  • in the solution explorer, when right-clicking references
  • int the solution explorer, when right-clicking project-->add
  • from the top menu project

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

pear95
pear95

Reputation: 66

In my case, I used NuGet Packages. This solution is half working, but you can add reference to most popular libraries.

Ref to System.IO.Ports

Upvotes: 0

RedApe
RedApe

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

Chandrasekhar Raman
Chandrasekhar Raman

Reputation: 704

The steps to Add a Reference in Visual Studio is:

  1. Go to the Project option in the top toolbar.

  2. Add Reference option(Roughly the 10th option from top).

  3. 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

Related Questions