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

How to handle class name collision in nuget package

$
0
0

I have a C# project with a static class MyNamespace.Global. It contains things like constants that are used throughout the code. e.g. Global.MAX_NAME_LENGTH. One of the 3rd party nuget packages I'm using declares a class Global without a namespace. When I try to build my project, I get a bunch of errors saying Global does not contain MAX_NAME_LENGTH. It's trying to use the 3rd party Global class instead of my class, even though I have "using MyNamespace" at the top of my source files. Is there a way to get around this without changing all of my calls to MyNamespace.Global or renaming my Global class?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



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