Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use NuGet with Visual C# Express?

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.

I downloaded "NuGet Package Manager" (the .vsix) from the downloads page, but when it prompts me for which versions of Visual studio to integrate into, it only lists Visual Web Developer Express 2010. Visual C# Express isn't shown. So I guess it would work with Silverlight in VWD, but I want to use it with WPF.

One of the documentation pages linked me to the 1.0 CTP download page, which included a command-line version of NuGet (no longer present in the latest version). But the command-line version seems to be crippled -- the only operation it seems to support is building a package for distribution; it doesn't seem to support the commands for adding a reference to a library package.

Is there any way at all to use NuGet with Visual C# Express?

like image 724
Joe White Avatar asked Dec 30 '10 22:12

Joe White


People also ask

How do I import NuGet manually into Visual Studio?

You first have to tell Visual Studio about the location of your package, and then you can add it to a project. What most people do is go into the NuGet Package Manager and add the local folder as a source (menu Tools → Options → NuGet Package Manager → Package Sources).

Can I use NuGet with C++?

You can use NuGet in any C++ project type – this works for desktop, Windows Store, and Windows Phone 8 applications equally.

Does NuGet come with Visual Studio?

On Windows, the NuGet Package Manager is included with Visual Studio 2012 and later. Visual Studio provides the Package Manager UI and the Package Manager Console, through which you can run most NuGet operations.

What is a NuGet Package C#?

Put simply, a NuGet package is a single ZIP file with the . nupkg extension that contains compiled code (DLLs), other files related to that code, and a descriptive manifest that includes information like the package's version number.


2 Answers

Update (9/12/2012): Good news: Visual Studio Express 2012 for Windows Desktop is now available (here), and it supports NuGet out of the box. Generally speaking, every edition of VS2012 now supports NuGet, so this limitation should be a thing of the past!


Original answer:

Microsoft signs NuGet in a way that allows it to work with VWD Express. Ideally, it would also be signed in a way that it works with C# Express (it may have to be a separate build). Unfortunately, we were not able to do this for the initial release (it's more of a challenge than you might think).

Going forward, we will try to enable this scenario. Feel free to file a bug on the NuGet site just to let others who are affected a chance to vote it up!

like image 80
David Ebbo Avatar answered Sep 19 '22 22:09

David Ebbo


If you have VWD Express installed you can work around this as follows:

  1. Save and close your project in c# Express

  2. Open the project in VWD Express and use Nuget from there to add your packages

  3. Save your project and go back to c# Express

like image 25
David Avatar answered Sep 23 '22 22:09

David