"Import" namespace
I'm new to rider, and I have a hard time to understand how to handle this tool correctly in some places even after searching for information, so I hope someone can help me here.
To make
using System.Management.Automationwork, I understand that I need a “link” to an external dll (library, assembly) in my project. I learned that the easiest way is to use NuGet. When installing the NuGet package, it is listed under <MyProject> > Dependencies > NET 9.0 > Packages in the Solution Explorer, and the above line works.
I suppose that if I install the PowerShell SDK instead, I'd need to right-click Dependencies in Solution Explorer, and select Reference… > Add From… and point to the dll file (MS shows the name of the dll in the online documentation)?
I've seen a multitude of folders and subfolders in the Global Folders location that's listed in NuGet > Folders; guess that's pre-installed, the're no references to any of my project(s) shown in the NuGet pane. Does Rider use these libraries/assemblies automatically if I do a using <namespace>, or do I need to create an explicite reference in Solution Explorer if I want to use one of those packages in one of my projects?
Please sign in to leave a comment.
If you use NuGet to install extra packages, dependencies will be auto-configured in the
.csproj. You don't need to create references manually. If the package is not referenced by the current project, when you type the namespace, Rider will guide you to install it from NuGet. If the package has a local cached version, NuGet will manage it.