-
Notifications
You must be signed in to change notification settings - Fork 10.3k
TopLevelParameterNameAnalyzer threw an exception of type 'System.NullReferenceException' #8686
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
Comments
Thanks for the report. We addressed this as part of #8403. If you get the most recent SDK ( |
I've just download SDK (3.0.100-preview4-011223) and I am now also getting this NRE - has something reverted? |
@spydacarnage not that I know of. I'll reopen this issue for investigation. |
Thanks |
I'm getting the same on Preview 5, but as warning and it does not prevent me from building the app:
|
Thanks @Enngage. I think I sorted out of the last null refs from this analyzer. |
I'm still getting this with v3.0.100-preview6-012264:
This is no
What else can I provide to help troubleshoot this? |
@hellfirehd do you happen to have the stack trace for this? Also, does this reproduce with a specific app? If so could you share it? |
I don't know how to get a Stack Trace from inside Visual Studio 2019 Community but it only happens during build, but on several different projects. https://gist.github.com/hellfirehd/9720846be7aa1880f794861921f3c03a I'm willing to share the Source Code/Project Files for Project1.txt |
That would be great! |
@pranavkm How do I get it to you? It's a .zip |
Could you publish it as a GitHub repo? I think GitHub might also allow you to attach zip files to comments. |
Invite sent. |
Your netcoreapp3.0 application is referencing 2.2 versions of packages which is unsupported. Have a look at https://docs.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-2.2&tabs=visual-studio for migrating to 3.0. |
I am still seeing this issue. Here's the stack trace Severity Code Description Project File Line Suppression State Detail Description Exception occurred with following context: |
What version of Core, VS2019, etc. are you using?
I had the problem as well, but it went away weeks ago after an upgrade.
…On Tue, 6 Aug 2019, 18:26 Sunil Dixit, ***@***.***> wrote:
I am still seeing this issue.
Here's the stack trace
Severity Code Description Project File Line Suppression State Detail
Description
Warning AD0001 Analyzer
'Microsoft.AspNetCore.Mvc.Analyzers.TopLevelParameterNameAnalyzer' threw an
exception of type 'System.NullReferenceException' with message 'Object
reference not set to an instance of an object.'. ConnectorApp.Web 1 Active
Analyzer 'Microsoft.AspNetCore.Mvc.Analyzers.TopLevelParameterNameAnalyzer'
threw the following exception:
'Exception occurred with following context:
Compilation: ConnectorApp.Web
ISymbol: Create (Method)
System.NullReferenceException: Object reference not set to an instance of
an object.
at
Microsoft.CodeAnalysis.CodeAnalysisExtensions.IsAssignableFrom(ITypeSymbol
source, ITypeSymbol target)
at Microsoft.CodeAnalysis.CodeAnalysisExtensions.d__2.MoveNext()
at Microsoft.CodeAnalysis.CodeAnalysisExtensions.d__4.MoveNext()
at System.Linq.Enumerable.Any[TSource](IEnumerable1 source) at
Microsoft.AspNetCore.Mvc.Analyzers.TopLevelParameterNameAnalyzer.<>c__DisplayClass3_0.<InitializeWorker>b__0(SymbolAnalysisContext
symbolAnalysisContext) at
Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.<>c.<ExecuteSymbolActionsCore>b__43_1(ValueTuple2
data)
at
Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[TArg](DiagnosticAnalyzer
analyzer, Action1 analyze, TArg argument, Nullable1 info)
'.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8686>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADIEDQIGSNRZKTD6TUFUJPTQDGX4PANCNFSM4HAASQNA>
.
|
Hi, it looks like you are posting on a closed issue/PR/commit! We're very likely to lose track of your bug/feedback/question unless you:
Thanks! |
I am having an issue as well. My netstandard projects reference these packages:
I don't have any need for these packages in the .csproj for my netcoreapp3.0. |
would it be worthwhile having some better interactive feedback as to this scenario? I assume most people will just change to |
I had a working solution with no warnings or errors. Just downloaded the production release of Visual Studio 2019 16.3.0. Now I'm getting:
|
@SimonCropp our migration guide is fairly elaborate, so hopefully this should be covered. @gammafour \ @deathcat05 please file a separate issue, possibly with a minimal repro. I'm locking this issue since we've resolved the original issue and it's just incredibly noisy at this point. |
Describe the bug
dotnet build throws using
3.0.100-preview4-010911
of the sdkMicrosoft.AspNetCore.Mvc.Analyzers.TopLevelParameterNameAnalyzer threw an exception of type 'System.NullReferenceException'
To Reproduce
on my builds
Expected behavior
should build
Additional context
I attached the diagnostic build logs and dotnet --info
build.zip
ditnet.info.txt
The text was updated successfully, but these errors were encountered: