| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <!-- Source Generator 必须使用 netstandard2.0 -->
- <TargetFramework>netstandard2.0</TargetFramework>
- <LangVersion>latest</LangVersion>
- <Nullable>enable</Nullable>
- <ImplicitUsings>disable</ImplicitUsings>
- <!-- Roslyn 分析器/生成器配置 -->
- <EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
- <IsRoslynComponent>true</IsRoslynComponent>
- <!-- 不作为普通引用,仅作为分析器 -->
- <IncludeBuildOutput>false</IncludeBuildOutput>
- <DevelopmentDependency>true</DevelopmentDependency>
- <!-- 禁止生成符号包(源生成器通常不需要调试) -->
- <!-- 如需调试支持,改为 true -->
- <IncludeSymbols>false</IncludeSymbols>
- <!-- 禁止依赖项组 -->
- <SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
- <!-- NuGet 包元数据 -->
- <RootNamespace>Apq.Cfg.SourceGenerator</RootNamespace>
- <Description>Apq.Cfg 源生成器,编译时生成强类型配置绑定代码,零反射</Description>
- <PackageTags>configuration;source-generator;roslyn;aot;codegen</PackageTags>
- </PropertyGroup>
- <!-- Roslyn 依赖 - 使用 4.3.0 以兼容更多编译器版本 -->
- <ItemGroup>
- <PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" PrivateAssets="all" />
- <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.0" PrivateAssets="all" />
- </ItemGroup>
- <!-- 打包为分析器 -->
- <ItemGroup>
- <None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
- </ItemGroup>
- </Project>
|