-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Handle obsolete InterceptorsPreview with .NET 8 RC2 SDK #92247
Conversation
Tagging subscribers to this area: @dotnet/area-extensions-configuration Issue DetailsWhen building the runtime repo using the latest build of .NET 8 RC2 SDK, it produces the following error:
This is due to a new change from Roslyn: dotnet/roslyn#69848. It replaces the usage of the The use of
|
@mthalman isn't the SDK and the configuration binder packages already enable Line 4 in e1ca02f
or non of these targets is executed in the failing cases? Why do we need to add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mthalman thanks for sending this change. I had also fixed it in the dotnet/roslyn dependency flow PR, but it's slightly differently: 8013838
Unfortunately, another CI failure showed up, so I suppose the value I selected for InterceptorsPreviewNamespaces was not the right one? #92150 (comment)
Anyway, if the CI is green in this PR, we can merge it before the roslyn deps flow and I can revert my change in that PR.
Tentatively approving.
Also - Marking this as |
<Features>$(Features);InterceptorsPreview</Features> | ||
<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);Microsoft.AspNetCore.Http.Generated</InterceptorsPreviewNamespaces> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the right namespace for this repo. Shouldn't we use the Configuration namespace, like Carlos's PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops. Copy-paste error after making similar changes in aspnetcore.
Ahh - source build is a good case. @carlossanlop this was what I was guessing at in our chat earlier when trying to think of something that might need to use the old SDK on the latest codebase. Source build bootstrapping. |
I might be able to address this problem in the the two dotnet/roslyn deps flow PRs (main and 8.0), thanks to @ericstj help. If the CI looks green, I'll merge those ones, and we can close this (I copied the TODO comment there). |
@tarekgh - The targets file which implements that is not in scope for these other projects. |
When building the runtime repo using the latest build of .NET 8 RC2 SDK, it produces the following error:
/vmr/src/runtime/artifacts/source-build/self/src/src/libraries/Microsoft.Extensions.Logging.Configuration/src/Microsoft.Extensions.Configuration.Binder.SourceGeneration/Microsoft.Extensions.Configuration.Binder.SourceGeneration.ConfigurationBindingGenerator/BindingExtensions.g.cs(33,10): error CS9137: The 'interceptors' experimental feature is not enabled in this namespace. Add '<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);Microsoft.Extensions.Configuration.Binder.SourceGeneration</InterceptorsPreviewNamespaces>' to your project. [/vmr/src/runtime/artifacts/source-build/self/src/src/libraries/Microsoft.Extensions.Logging.Configuration/src/Microsoft.Extensions.Logging.Configuration.csproj::TargetFramework=net8.0]
This is due to a new change from Roslyn: dotnet/roslyn#69848. It replaces the usage of the
InterceptorsPreview
feature with anInterceptorsPreviewNamespaces
property that needs to specify the applicable namespace.The use of
InterceptorsPreview
in the project is still needed in order to work with the RC1 SDK. Both need to be specified as support for both versions of the SDK is required to support source-build scenarios. A separate issue will be logged as follow-up to remove the obsoleteInterceptorsPreview
feature usage.This change is needed for RC2 release.