-
Notifications
You must be signed in to change notification settings - Fork 1
Configuration
Igor Tkachev edited this page Jun 11, 2026
·
2 revisions
AspectGenerator itself targets netstandard2.0, but consuming projects must be built with the .NET 10 SDK/compiler because the generator uses the stable Roslyn interceptor API based on opaque InterceptableLocation data.
<PropertyGroup>
<AspectGeneratorGenerateApi>true</AspectGeneratorGenerateApi>
<AspectGeneratorPublicApi>false</AspectGeneratorPublicApi>
<AspectGeneratorDebuggerStepThrough>false</AspectGeneratorDebuggerStepThrough>
<AspectGeneratorInterceptorsNamespace>AspectGenerator</AspectGeneratorInterceptorsNamespace>
<InterceptorsNamespaces>$(InterceptorsNamespaces);AspectGenerator</InterceptorsNamespaces>
</PropertyGroup>using AspectGenerator;
[assembly: AspectGeneratorOptions(
GenerateApi = true,
PublicApi = false,
DebuggerStepThrough = false,
InterceptorsNamespace = "AspectGenerator")]Assembly attribute values override MSBuild properties.
Do not use these preview-era settings for current versions:
InterceptorsPreviewNamespacesAG_InterceptorsNamespaceAG_PUBLIC_APIAG_NOT_GENERATE_APIInterceptsLocation(filePath, line, character)