+ 1

How to use a class define in library without referencing the package? In C# using visual studio.

I have a program that use a method on a class. That class is in a library that uses a reference to a package. That method returns a class defined in that package. Visual studio tells me I must reference that package to use that class in my program. Is there a way to use that class without referencing the package in my program?

23rd Sep 2017, 11:49 AM
Steve DICAY
Steve DICAY - avatar
2 Antworten
+ 1
I expressed myself badly. I talked about a nuget package I imported.
23rd Sep 2017, 12:49 PM
Steve DICAY
Steve DICAY - avatar
+ 1
I have a program for the GUI and it uses a library. This library has a reference to a nuget package. Winscp to be precise. There is a method to get a listing of directories in a ftp directory. That method returns a collection of objects. Those are defined in the Winscp library. So when I want to use the return of the method in my GUI program, it doesn't know the definition of these objects. But if I reference the Winscp library in my GUI program, I wouldn't need to use a library. But I resolved my problem by making a new class in my library and I copied the collection in a list of my class. It was not very long.
23rd Sep 2017, 1:18 PM
Steve DICAY
Steve DICAY - avatar