Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

How do I automatically install a nuget package from a roslyn code fixer

$
0
0

I try to add a nuget package reference automatically to a visual studio project if needed, with the help of a roslyn code fixer.

Since the "CodeFixProvider" is not a "Microsoft.VisualStudio.Shell.Package" there is no GetGlobalService Method to retreive a "IComponentModel" in order to get the "IVsPackageInstaller2" service.

Is there another or an even better way to add a nuget reference to a project?I am a bit lost here after days of googling.

Thanks in advance!


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>