How can I use NuGet with Visual C# Express?

前端 未结 4 1580
一整个雨季
一整个雨季 2020-12-12 23:25

How can I use NuGet to add a library package reference, when I have Visual C# 2010 Express?

NuGet doesn\'t come up when I search for it in Tools > Extension Manager.

4条回答
  •  难免孤独
    2020-12-12 23:51

    To install a package in visual studio c# express 2010 use the command line tool nuget.exe. Download nuget.exe from the nuget website add the path to the executable to the windows path environment variable, cd to a place you want you library to be then run it with the library name as an argument.

    C:\Code\myprojectdir\myproject>nuget install CommandLineParser
    Installing 'CommandLineParser 1.9.71'.
    Successfully installed 'CommandLineParser 1.9.71'.
    

    Then just add a reference to the appropriate version of the dll (ie 4.0), in visual studio c# 2010 using project->add reference->browse. Then build the project.

提交回复
热议问题