C#C
C#5mo ago
Angius

"Interceptors feature not enabled in this namespace" despite being enabled

I'm seeing this error, despite the exact line it says I should add, being added. Happens only sometimes when using hot reload in Rider
<Project Sdk="Microsoft.NET.Sdk.Web">
    <PropertyGroup>
        <TargetFramework>net9.0</TargetFramework>
        <LangVersion>13</LangVersion>
        <PackageId>Ogma3</PackageId>
        <Nullable>enable</Nullable>
        <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
        <ApplicationIcon>wwwroot\favicon.ico</ApplicationIcon>
        <NeutralLanguage>en</NeutralLanguage>
        <EnableNETAnalyzers>true</EnableNETAnalyzers>
        <AnalysisLevel>latest</AnalysisLevel>
        <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
        <CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)Generated</CompilerGeneratedFilesOutputPath>
        <ImplicitUsings>true</ImplicitUsings>
        <EnableEnumGeneratorInterceptor>true</EnableEnumGeneratorInterceptor>
        <InterceptorNamespaces>$(InterceptorsNamespaces);Microsoft.Extensions.Logging.AutoLoggerMessage.</InterceptorNamespaces>
    </PropertyGroup>
image.png
Was this page helpful?