-
Notifications
You must be signed in to change notification settings - Fork 470
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
Remaining NRE in CSharpDiagnosticAnalyzerApiUsageAnalyzer #1888
Comments
Workaround was ignoring rule |
@frblondin I am still seeing this error in VS 2017.15.9.3 how can I get the fix. |
@paul1956 Can you try the latest 2.6.XXX NuGet package from https://dotnet.myget.org/feed/roslyn-analyzers/package/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/2.6.3-beta1.18566.1+3a9597c6 ? Hoping to publish it to nuget soon... |
Same error, is there any information I can provide to help? I published the failing project https://github.com/paul1956/CSharpToVB |
@paul1956 the workaround is to ignore the
Go here if you need guidance on how to use & appy ruleset files. |
Paul, do you have a stand-alone repro that I can use? |
I see you provided a repro, I will investigate. |
@paul1956 - Unable to repro the error with the project you provided. The project does not even build for me, not sure if I need additional steps:
|
@frblondin I am unable to find your feature branch and building the master branch seems to be fail. Again, do I need some additional setup steps? Can you point me to the documentation about setting up your project for build? |
@mavasani thanks for looking at this.
This error shows up only once, later builds work. You need to change code... or close Visual Studio, execute The master branch should be compiling: tested on various computers, compiles on AppVeyor... please share the errors you are getting if any. |
@frblondin Thanks, I was able to repro the AD0001/NRE. However, I noticed that the AD0001 is firing in your test project which is still referencing version
Also tagging @jmarolf - probably we should move the Microsoft.CodeAnalysis.Analyzers referenced by Microsoft.CodeAnalysis NuGet package forward from 2.6.1 to 2.6.3. Can you remind me where should I make this change - roslyn-sdk repo or roslyn repo? |
@paul1956 Can you also confirm this for your repro? Does adding an explicit package reference to "Microsoft.CodeAnalysis.Analyzers" Version="2.6.3" fix your AD0001? |
The repo is continuedly being updates, there is a stable version now but it does not show the error. I should have provided the version that had the error. I now have an explicit reference to Microsoft.CodeAnalysis.Analyzers" Version="2.6.3" and have not seen the error. |
@mavasani https://github.com/dotnet/roslyn-sdk is the correct place to make these changes Example: C# Console App |
@jmarolf - I meant we need to update the nuspec for Microsoft.CodeAnalysis so the NuGet package itself has a package dependency on v2.6.3 of Microsoft.CodeAnalysis.Analayzers, currently it references 2.6.1 |
Filed dotnet/roslyn-sdk#243 to ensure we update the nuspec for Microsoft.CodeAnalysis. |
The nuget package definition for |
Analyzer package
Microsoft.CodeAnalysis.CSharp.Analyzers
Package Version
v2.6.2
Diagnostic ID
None provided.
Repro steps
feature/metaprogramming
Interesting thing to note, CodeGeneration.Roslyn is used by failing projects.
Actual behavior
CSC : error AD0001: Analyzer 'Microsoft.CodeAnalysis.CSharp.Analyzers.MetaAnalyzers.CSharpDiagnosticAnalyzerApiUsageAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
I'd like to know how to debug such errors so I can submit a PR.
The text was updated successfully, but these errors were encountered: