Skip to content
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

NullReferenceException from AspNetCore analyzer RegistrationExpectedInASPNetIntegration #2888

Open
jviau opened this issue Dec 4, 2024 · 0 comments
Labels
Needs: Triage (Functions) potential-bug Items opened using the bug report template, not yet triaged and confirmed as a bug

Comments

@jviau
Copy link
Contributor

jviau commented Dec 4, 2024

Description

After some refactoring the functions host CI started failing due to this error:

##[error]CSC(0,0): Error AD0001: Analyzer 'Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.RegistrationExpectedInASPNetIntegration' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.

Unfortunately, there is not much more information. Not even line number. This is affecting DotNetIsolated60.csproj, but something about it is sensitive to other msbuild properties as this only began after some refactoring of mine.

Maybe this is due to the way the app if/elses calling the expected method? https://github.com/Azure/azure-functions-host/blob/dev/test/DotNetIsolated60/Program.cs#L12

Steps to reproduce

Unable to narrow down repro, this happens in functions host CI but not locally. Failing CI here

@jviau jviau added the potential-bug Items opened using the bug report template, not yet triaged and confirmed as a bug label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage (Functions) potential-bug Items opened using the bug report template, not yet triaged and confirmed as a bug
Projects
None yet
Development

No branches or pull requests

1 participant