This project is read-only.


Support Managed C++ Project Types


Need to be able to install packages into an managed C++ project type.

file attachments

Closed Mar 27, 2013 at 3:54 PM by jcookems


dotnetjunky wrote Apr 19, 2011 at 11:50 PM

I take over this.

dotnetjunky wrote Apr 21, 2011 at 7:48 PM

why only unmanged? we should support managed C++ projects too.

Haacked wrote Apr 28, 2011 at 4:51 PM

Decided to punt this for now due to lack of interest.

rodolfograve wrote Oct 5, 2011 at 9:55 AM

Are you working on this? I really need it now and I'll be very happy to do it myself or help you.

dotnetjunky wrote Oct 5, 2011 at 4:28 PM

No, I am not working on this. We may not do it at all because of the lack of interest from the community. If you want to do it, by all means. We welcome any contribution to NuGet. Feel free to ask question on the Discussions board if you get stuck on something.

Having said that, we have tentative plan to support the C++ WinRT project in Windows8. If you want to look at that too, that would be great :)

rodolfograve wrote Oct 21, 2011 at 12:10 PM

Ok, I'm going to start working on this. I'll try to keep this discussion updated with any progress, or if I stop at some point.

rodolfograve wrote Oct 25, 2011 at 3:47 PM

I've found this blocking issue: Project.UniqueName is null for a Win32 C++ project.

This UniqueName is used by NuGet to identify projects. The first exception I get while adding a new package to this Win32 C++ project is a NullArgumentException at
NuGet.VisualStudio.VsPackageManager.EnsureCached (line 53: if (_projects.ContainsKey(project.UniqueName))

Any ideas on why does this C++ project not have a UniqueName? Any ideas on how to work around this issue?


dotnetjunky wrote Oct 25, 2011 at 7:29 PM

What type of C++ project did you create? I just tried this on a C++ Console project and a C++ Windows project. Both return UniqueName correctly.

PM> $p = $dte.Solution.Projects.Item(1)
PM> $p.UniqueName

dotnetjunky wrote Nov 4, 2011 at 12:33 AM

Hi, do you still have problem with this? Don't hesistate to let us know what we can help you with.

teajay wrote Nov 22, 2011 at 12:02 PM

I'm definitely interested in this feature. I found the fork but I'm not sure if anybody is still working in this.
I'm willing to contribute to this feature, if there is already some work being done, let me know. I'm starting off from what I found in the fork.

rodolfograve wrote Nov 22, 2011 at 1:44 PM

Hi teajay.

This is in my TODO list, but I haven't been able to find the time and I won't do it at least for another 2 weeks so it will be great if you can take this a bit forward.

I've just submitted the few things I had done:
  • Remove FxCop dependency from the Build.csproj so that you can build even with VS Professional.
  • Added a hollow CPlusPlusProjectSystem class.
With this, and following the procedures described in I was able to debug the plugin and found the error related to the UniqueName described in my previous message.

teajay wrote Nov 22, 2011 at 2:44 PM

Great. I'll pull that this evening and I'll start looking at it.

teajay wrote Dec 4, 2011 at 9:19 PM

I just attached a file containing a sample dummy package as well as two c++ projects, one with the installed package and one without.

dotnetjunky wrote Dec 6, 2011 at 6:42 PM

assign to me so that I can track this time.

teajay wrote Dec 24, 2011 at 10:02 PM

Just pushed a Christmas treat here:

This is a fork with initial c++ project support for nuget. It works for Managed and Unmanaged C++ as far as I've tested. I would be very pleased to get some feedback on what I've achieved so far.

gerngroh wrote Jan 18, 2012 at 8:46 PM

Nice work, this is exactly what I need.
Solves all my requirements except x86/x64 configurations.

Is it possible to include this fork in offical release 1.7?

teajay wrote Jan 19, 2012 at 3:43 PM


That's a good point you've made, I didn't think of the x64/x86 issue. I'll provide support for that too.
Did you get your hands on the fork and test anything ? If you did, was that successful ?

I can't promise anything about the integration into the 1.7, I'll do my best to help the developpers get that in.

gerngroh wrote Jan 20, 2012 at 7:21 AM

I used the fork in a small test project for including managed and native dependencies in a managed C++/CLI project.
The native package I built was targeting the old VC90 toolset, so this works also.

For the x64/86 issue: It would be nice to have this included but I think even the official NuGet 1.6 has no standard way to handle it for C# projects.

teajay wrote Apr 30, 2012 at 8:58 AM

Target architecture support has been added to the fork. I also updated the fork to Nuget 1.9.

teajay wrote May 7, 2012 at 9:34 PM

Here's a sample package / symbol package produced with the c++ project support.

vytautasb wrote Oct 4, 2012 at 12:26 PM

This is a blocker for our company. Is it in the plans to implement it?

dotnetjunky wrote Oct 4, 2012 at 5:54 PM

Yes, we're working on it.

chadpeterson wrote Dec 13, 2012 at 7:10 PM

Any updates on status? My group of developers could really use dependency management for unmanaged VC++ projects.

JeffHandley wrote Jan 23, 2013 at 9:41 PM

Triage: moved into 2.3 due to high vote count.
This is not a guarantee that it will be completed in 2.3 though.

jcookems wrote Mar 27, 2013 at 3:21 AM

I have finished testing this feature.