hi! my goal is to write an extension (in fact, a guidance automation package) to generate a solution, with some projects, some of them using nuget packages.
i must be able to:
- add a source, with credentials
- add packages to project, without knowing from which source. (like in nuget.exe install, you don't have to specifiy the source, if so, it browses all sources)
so i try Nuget.VisualStudio first with success:
- IVsPackageInstaller to install packages (overload with repository, passing an aggregate repository --> needed to reference Nuget.Core)
- IVsPackageSourceProvider to add sources, but again, needed to reference Nuget.Core to access to PackageSource type
it worked beyond my hopes, untill for some reasons i had my Nuget Extension using different dlls versions from the ones I reference from my package project.
the problem is Nuget.VisualStudio will never change (I hope :-) ) but Nuget.Core version always changes.
so, even if I solved the version mismatch problem on my machine, I can't force users to have a certain Nuget version.
- find a way not to used Nuget.Core, but onlu Nuget.VisualStudio
- find a way to install to a package to a specific project, using nuget.exe
- find a way to import Nuget command in a RunSpace, to be able to "nuget powershell" from my C# code