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

How do I make my library work with using-directive?

$
0
0

I created a class library with .Net 6.0 which looks like this:

namespace MyLib{    public static class MyLib {        public static void someFunction() { }    }}

I created a nuget package and added that package to another application. My expectation was that I would put using MyLib at the top of a class and then could call MyLib.someFunction() in the code. But instead, I always have to call MyLib.MyLib.someFunction(), with the using-directive doing nothing.

Can someone explain to me what I'm doing wrong?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



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