Skip to content

Configuration binding source generator throws ArgumentOutOfRangeException on macOS and Linux #89014

@martincostello

Description

@martincostello

Description

When using the Configuration binding source generator to compile and test an application on Linux, macOS and Windows the application fails to compile on Linux and macOS.

Exactly what is causing this I don't know, but I can reproduce it with three different repositories.

Logs for one such example can be found here.

My own computer runs Windows, so I didn't find this issue until I pushed my local changes which were working to GitHub and the CI ran.

Reproduction Steps

  1. Clone and checkout any of the following commits:
  2. Run build.ps1.

Expected behavior

The applications compile and the tests pass.

Actual behavior

The application fails to compile on macOS and Linux with the following exception:

CSC : error CS8785: Generator 'ConfigurationBindingGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentOutOfRangeException' with message 'Specified argument was out of the range of valid values. (Parameter 'value')'

Regression?

No.

Known Workarounds

None.

Configuration

.NET SDK 8.0.100-preview.6.23330.14

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions