Skip to content

RequestDelegateGenerator throws NullReferenceException in ASP.NET Core 8 preview 2 #47202

Description

@martincostello

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Building an existing .NET 7 solution with .NET 8 preview 2 fails with the following error:

CSC : error CS8785: Generator 'RequestDelegateGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'NullReferenceException' with message 'Object reference not set to an instance of an object.' [/home/runner/work/lambda-test-server/lambda-test-server/src/AwsLambdaTestServer/MartinCostello.Testing.AwsLambdaTestServer.csproj::TargetFramework=net8.0]

Expected Behavior

The solution compiles and tests pass.

Steps To Reproduce

  1. Clone the martincostello/lambda-test-server repository
  2. Checkout the repository at martincostello/lambda-test-server@e47cc13
  3. Run build.ps1

Exceptions (if any)

CSC : error CS8785: Generator 'RequestDelegateGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'NullReferenceException' with message 'Object reference not set to an instance of an object.' [/home/runner/work/lambda-test-server/lambda-test-server/src/AwsLambdaTestServer/MartinCostello.Testing.AwsLambdaTestServer.csproj::TargetFramework=net8.0]

.NET Version

8.0.100-preview.2.23157.25

Anything else?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: DuplicateResolved as a duplicate of another issueStatus: Resolvedarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions