Aug 10, 2011 A better title would be 'How to Cobble Together NuGet Support for Visual Studio 2008 with External Tools and a Prayer.' The point is, there are lots of folks using Visual Studio 2008 who would like NuGet support. I'm exploring this area and there's a half-dozen ways to make it happen, some difficult and some less so.
NuGet is a Visual Studio extension that makes it easy to install and update third-party libraries and tools in Visual Studio. NuGet is not mandatory for using the PayPal SDKs but makes managing dependencies in your application a lot simpler.
Visual Studio 2005 and 2008 do not have out of the box support for NuGet. However you can follow the instructions given here to get NuGet working in your IDE.
Prerequisites
- .NET Framework 4.0 - You must have .NET framework 4.0 installed on your machine.
- NuGet.exe - Download the NuGet command line executable from http://nuget.codeplex.com/releases
- Make sure NuGet.exe is available in the PATH environment variable.
Check if .NET Framework 4.0 or higher is installed in the Computer from Control Panel -> Get programsOr elseRun the following command from Windows Command Prompt >:
wmic product where 'Name like 'Microsoft .Net%' get Name, Version
- Please wait for the command to execute, it may take more than a minute to execute
- Running the aforesaid command should list the .NET Framework versions installed as in this particular case
- [Please note the command might take a while to execute]
Running the aforesaid command should list the .NET Framework versions installed similar to the following:
If V4.X is not installed, then download and install
- .NET Framework 4 (Standalone Installer) – (free to download): http://www.microsoft.com/en-in/download/details.aspx?id=17718OR
- .NET Framework 4 (Web Installer) – (free to download): http://www.microsoft.com/en-in/download/details.aspx?id=17851
Installation
- Go to Visual Studio Menu --> Tools
- Select External Tools…
- Select 'Add'.
- Enter the following:
- Click Apply
- Click OK
On Clicking Apply and OK, NuGet Install will be added (as External Command) to Menu --> Tools
![Install nuget package visual studio 2008 full Install nuget package visual studio 2008 full](https://imgs.developpaper.com/imgs/1227137914-56e25b702b668_articlex.png)
Menu --> Tools, clicking NuGet Install will pop up for NuGet Install Arguments and Command LineAlso, NuGet Toolbar can be added, right-click on Visual Studio Menu and select Customize…Customize by clicking New…Enter Toolbar name: NuGet and click OKCheck NuGet Checkbox in the Toolbars tab for NuGet Toolbar to pop upClick Commands tab and select Tools and External Command 6 (Having added NuGet Install as External Command 6*)*Note: The External Command number may differ depending on the particular Visual Studio installationDrag and drop External Command 6 to NuGet ToolbarRight-click NuGet ToolbarEnter Name: Install PackageRight-click Change Button Image and select an imageClose CustomizeDrag and drop NuGet Toolbar to the Menu
![Visual studio nuget package restore Visual studio nuget package restore](http://www.hanselman.com/blog/content/binary/Windows-Live-Writer/How-to-use-cobble-together-NuGet-Support_A46B/image_2.png)
Using NuGet
- Click the NuGet Toolbar Install PackageClicking on the NuGet Toolbar Install Package will pop up for NuGet Install Arguments and Command LineExample NuGet Install:Enter Arguments:install PayPalCoreSDK -excludeversion -outputDirectory .Packages
On clicking OK, the output window should display:
Menu View --> Output (Ctrl+Alt+O)
The 'PayPalCoreSDK' Package including the dependencies will be downloaded to the 'Packages' folder root directory of the Solution (.sln) file.
Select 'Packages' folder by clicking it and then click 'Show All Files' in the Solution ExplorerNote: If 'Packages' folder was not included in the Solution Explorer, click 'Show All Files' before clicking 'Refresh'Add the references to the dependent files downloaded to 'Packages' folder:
Note: By default, the root directory of Nuget Installation is the same as that of the Solution (.sln) file.In case of a direct installation using Visual Studio without loading any solution:The typical location for Visual Studio 2005:
'C:Program Files (x86)Microsoft Visual Studio 8Common7IDE'The typical Installation location for Visual Studio 2008:'C:Program Files (x86)Microsoft Visual Studio 9.0Common7IDE'
'C:Program Files (x86)Microsoft Visual Studio 8Common7IDE'The typical Installation location for Visual Studio 2008:'C:Program Files (x86)Microsoft Visual Studio 9.0Common7IDE'
Welcome to the Chocolatey Community Package Repository! The packages found in this section of the site are provided, maintained, and moderated by the community.
Moderation
Every version of each package undergoes a rigorous moderation process before it goes live that typically includes:
- Security, consistency, and quality checking
- Human moderators who give final review and sign off
More detail at Security and Moderation.
Organizational Use
If you are an organization using Chocolatey, we want your experience to be fully reliable. Due to the nature of this publicly offered repository, reliability cannot be guaranteed. Packages offered here are subject to distribution rights, which means they may need to reach out further to the internet to the official locations to download files at runtime.
Fortunately, distribution rights do not apply for internal use. With any edition of Chocolatey (including the free open source edition), you can host your own packages and cache or internalize existing community packages.
Disclaimer
Your use of the packages on this site means you understand they are not supported or guaranteed in any way. Learn more...