-
Notifications
You must be signed in to change notification settings - Fork 8
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
GCop140 #6
Comments
Actually it should always work and check all projects in the solution. We need to break the private vs public rules so they can be independently disabled. For example if a project is meant to be used as a library by projects outside of the current solution it can disable the Public rule. |
@PaymonK The issue you mentioned is fixed in the latest version. |
I'm still getting a lot of false positives. |
The latest version doesn't show any 140 warnings for the domain projects in our solutions. Probably because there is a reference to the domain, in the website project. which is not correct. We still need to look into the whole solution, to find if the method or property should be Private, Internal or Public. |
@Karvan Actually, because .NET Standard doesn't support EnvDTE namespaces yet, and since this rule uses those namespaces, GCop140 won't work in the new GCop packages. |
How about .NET Core and .NET Framework separately? We can create multi-platform targeting DLLs if required. |
@PaymonK I'm not sure about that, currently, Visual Studio only has Analyzer with Code Fix (.NET Standard) project type (which could be deployed as VSIX and NuGet package). Maybe in the future, Microsoft would add support for .NET Core and .NET Framework as well. |
Why do we need EnvDTE anyway? What alternative options can we use? |
@PaymonK Apparently rule 140 uses EnvDTE to look into every project of the given solution and then searches every file and class for the usage of a specific method. |
I mean other than EnvDTE there must be a way to find all projects and go through them. If you simply want to find all projects in the solution, you can use the file system directly too. |
we followed Roslyn team about this issue and we tried some workaround for having access to Project/Solution level. it's not reliable at all. then we are going to add a VS Extension just for this rule. for keeping the log: |
Rule 140 is giving us false positive.
It should only come into effect if the project is a web application
The text was updated successfully, but these errors were encountered: