-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Config binding gen omits a needed comma in an emitted Configure overload replacement #91258
Comments
Tagging subscribers to this area: @dotnet/area-extensions-configuration Issue DetailsDescriptionUpdating to .NET SDK
/cc @layomia Reproduction Steps
Expected behaviorThe application compiles. Actual behaviorThe application fails to compile with Regression?Yes compared to recent preview builds. Known WorkaroundsNone. Configuration.NET SDK Other informationNo response
|
cc @layomia |
Simple repro: using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
IServiceCollection services = null!;
IConfiguration configuration = null!;
services.Configure<MyOptions>(configuration.GetSection("repro"));
class MyOptions { } |
Thanks folks. I fixed this in #91180, which introduced build coverage for all the options-binding-extension methods to prevent regressions. We're planning to port it to RC-2. @martincostello, please try the fix when you get a chance. |
Sure, will report back when the SDK version flowing into my automation includes the fix. |
I ran into a different issue unrelated to this one when testing the fix on the I'll share details shortly & will likely create a separate issue. |
Scratch this, all's well. I verified that the fix works in your project. Pls let us know if you still face issues here & I'll reopen the issue. |
@layomia As well as spreading to an additional repository with the
Is this something that should already have been fixed and I just need to wait to flow into the installer/SDK, or is this a new problem? |
@martincostello thanks. That issue is fixed with #91107. #90851 describes it more, and this LOC is a sample test case. Workaround would be to move the |
Description
Updating to .NET SDK
8.0.100-rc.2.23428.11
from8.0.100-rc.2.23427.4
introduces compilation errors in the configuration binding source generator:/cc @layomia
Reproduction Steps
build.ps1
in the root of the repository.Expected behavior
The application compiles.
Actual behavior
The application fails to compile with
CS1003
andCS0246
errors.Regression?
Yes compared to recent preview builds.
Known Workarounds
None.
Configuration
.NET SDK
8.0.100-rc.2.23428.11
Other information
No response
The text was updated successfully, but these errors were encountered: