-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPOI.SS.UserModel.RangeType missing namespace #558
Comments
You might try this https://stackoverflow.com/a/1067573/13338936. by the way, why you use global namespace in your projects? |
@chucklu I am not using global namespaces in my project. The global namespace issues comes from NPOI RangeType which is a global namespace and overrides my RangeType, no correlation with NPOI's RangeType class (e.i missing namespace). As a example XSSFWorkbook has a namespace Inside https://github.com/nissl-lab/npoi/blob/master/main/SS/UserModel/ConditionalFormattingThreshold.cs the RangeType class should be included into the namespace NPOI.SS.UserModel like the interface is. |
Then you could use the RangeType of npoi as |
I am not using NPOI's RangeType at all in my code. |
Could you provide a sample repository? I tried to reference npoi in a new Console project, and I added a class RangeType without namespace, which means it's under global namespace. |
According Compiler Error CS0576, are you sure you did not use NPOI's RangeType? // CS0576.cs
using SysIO = System.IO;
public class SysIO
{
public void MyMethod() {}
}
public class Test
{
public static void Main()
{
SysIO.Stream s; // CS0576
}
} |
@chucklu it looks like you have totally misunderstood the problem. The NPOI code is clearly wrong. It should be an easy fix for anyone involved in developing this code. |
This looks to be a mistake. I'll adjust the namespace in the next release. |
The RangeType class found at namespace NPOI.SS.UserModel inside the IConditionalFormattingThreshold file does not have a namespace associate with it making It a global namespace, thus blocking any other class that shares the same name with it when the nugget package is added to any project producing the following error "Namespace ' contains a definition conflicting with alias RangeType". We have several projects with their own RnageType classes that conflict with the NPOI one.
The proposed fix is to add a namespace to the RangeType class and add corresponding using references in files that require said class.
The text was updated successfully, but these errors were encountered: