Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 726
SF1 Avatar asked Jul 28 '17 04:07

SF1


1 Answers

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.

like image 153
RedApe Avatar answered Sep 23 '22 15:09

RedApe