-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
CS9270 'InterceptsLocationAttribute(string, int, int)' is not supported when using Microsoft.Extensions.Configuration.Binder 8.0.x #76641
Comments
Seems to have been caused by Mark interceptors feature as stable and deprecate file path based attributes (dotnet/roslyn#76312). |
The 8.0.x version of Microsoft.Extensions.Configuration.Binder is using an old/deprecated approach to the interception feature in Roslyn. Using the latest version of Roslyn produces warnings (which turn into errors in the repo). Workaround https://github.com/dotnet/roslyn/issues/76600
CC @steveharter |
Note - this issue could be moved to dotnet/runtime, if the plan is to update and ship a |
The 8.0.x version of Microsoft.Extensions.Configuration.Binder is using an old/deprecated approach to the interception feature in Roslyn. Using the latest version of Roslyn produces warnings (which turn into errors in the repo). Workaround https://github.com/dotnet/roslyn/issues/76600
Note the same warning is emitted for 8.0 web api projects.
Opened: dotnet/aspnetcore#59735. |
We need to figure out the right fix and then we should service 8.0 if the fix comes from the runtime. CC @RikkiGibson |
This doesn't seem like a roslyn issue. the |
@CyrusNajmabadi Is there any published documentation for users who were using this feature, along with guidelines for transitioning to the checksum-based attribute? I know we (.NET Libraries) implemented this in version 9.0, but I’m checking if it's documented somewhere. I've noticed some user blogs still referencing the deprecated version. |
Anyone has permission transferring issues to runtime repo can help moving it there. |
You can use |
Done :) |
Tagging subscribers to this area: @dotnet/area-extensions-configuration |
Should we hold off on enabling this compiler warning until all supported usages (ConfigurationBinder and ASP.NET Minimal APIs v8) have moved off of it? |
That is what we do in 9.0: |
@RikkiGibson for doc and expected migration plan discussion |
It was not our goal to make generator authors service the .NET 8 versions of their generators to start using InterceptableLocation. The goal was just to get people moved to the new way for .NET 9 and up. Our plan is to leave in support for the "old way" in the SDK, for as long as .NET 8 is supported. At the time .NET 8 goes out of support, we will fully remove the support for the "old way" from the newest SDK. I think the resolution here should be to adjust the compiler so that warning |
@RikkiGibson Should this issue be moved back to the Roslyn repository then? |
Version Used: C# Tools 4.13.0-3.24620.4+98ea496177bc8e607dbf454abd6b5a5e4678aed2
Steps to Reproduce:
Diagnostic Id:
CS9270 'InterceptsLocationAttribute(string, int, int)' is not supported.
Expected Behavior:
The current Long-Term Supported version of
Microsoft.Extensions.Configuration.Binder
should be able to be used without warnings/errors.Actual Behavior:
You get a warning (turned into an error in repos with warning-as-error):
cc @ericstj @tarekgh @RikkiGibson
The text was updated successfully, but these errors were encountered: