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

Why name of the package is not accepted for 'using' clause

$
0
0

I have just started exploring NuGet in Visual Studio so this is pretty much a beginner question. I am trying to understand if name of a NuGet package as it appears in Solution Explorer is always the thing what we include in using clause?Here is the context. I am using Visual Studio 2019. I created a stub project (Console Application) in my solution which targets .NET 5.0 framework. Here is the stub:-

using System;namespace Random{    class Program    {        static void Main(string[] args)        {        }    }}

Now , I installed NuGet package against the project called itext7 7.1.15 (project url https://itextpdf.com/) using 'Manage NuGet Packages' option from Solution Explorer. The package installation succeeded.

enter image description here

As you can see in the screenshot , the name of the package appeaes as 'itext7' , so I included it in my code as shown in the following screenshot but as you can see it's not being recognized:-

enter image description here

My actual question is -- say if I just install any NuGet package randomly , is name of the package as I see it in Solution Explorer not enough knowledge in order to issue using statement against that package? In many other packages that I tried this worked. So how does one know exactly what to be used for using for an arbitrary package?


Viewing all articles
Browse latest Browse all 3186

Trending Articles



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