mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
- 将 RootLoggerName 常量从接口移至具体实现类 AbstractLogger - 在 AbstractLogger 中添加 IsEnabledForLevel 方法的完整实现 - 更新 ILogger 接口移除 IsEnabledForLevel 的默认实现 - 统一所有项目的目标框架为 netstandard2.0 - 修正命名空间引用确保日志相关类型正确导入 - 添加详细的 XML 文档注释提升代码可读性 - 优化项目构建属性配置支持更高版本的语言特性
64 lines
3.1 KiB
XML
64 lines
3.1 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
||
|
||
<PropertyGroup>
|
||
<PackageId>GeWuYou.GFramework.SourceGenerators</PackageId>
|
||
<TargetFramework>netstandard2.0</TargetFramework>
|
||
|
||
<!-- 这是 Analyzer,不是运行时库 -->
|
||
<IsRoslynAnalyzer>true</IsRoslynAnalyzer>
|
||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||
|
||
<LangVersion>latest</LangVersion>
|
||
<Nullable>enable</Nullable>
|
||
|
||
<!-- 可选:调试生成代码 -->
|
||
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
|
||
<CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>
|
||
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
|
||
</PropertyGroup>
|
||
|
||
<!-- Roslyn 依赖,只用于 Generator 自身 -->
|
||
<ItemGroup>
|
||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" PrivateAssets="all"/>
|
||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="4.14.0">
|
||
<PrivateAssets>all</PrivateAssets>
|
||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||
</PackageReference>
|
||
</ItemGroup>
|
||
|
||
<!-- Generator 编译期引用 SourceGenerators.Abstractions / Common / Core.Abstractions,但不打包 -->
|
||
<ItemGroup>
|
||
<ProjectReference Include="..\GFramework.SourceGenerators.Abstractions\GFramework.SourceGenerators.Abstractions.csproj" PrivateAssets="all"/>
|
||
<ProjectReference Include="..\GFramework.SourceGenerators.Common\GFramework.SourceGenerators.Common.csproj" PrivateAssets="all"/>
|
||
<ProjectReference Include="..\GFramework.Core.Abstractions\GFramework.Core.Abstractions.csproj" PrivateAssets="all"/>
|
||
</ItemGroup>
|
||
|
||
<!-- ★关键:只把 Generator DLL 放进 analyzers -->
|
||
<ItemGroup>
|
||
<!-- Generator 本体 -->
|
||
<None Include="$(OutputPath)\GFramework.SourceGenerators.dll"
|
||
Pack="true"
|
||
PackagePath="analyzers/dotnet/cs"
|
||
Visible="false"/>
|
||
|
||
<!-- ★ Generator 运行期依赖 -->
|
||
<None Include="$(OutputPath)\GFramework.SourceGenerators.Abstractions.dll"
|
||
Pack="true"
|
||
PackagePath="analyzers/dotnet/cs"
|
||
Visible="false"/>
|
||
<!-- ★ Generator 运行期依赖 -->
|
||
<None Include="$(OutputPath)\GFramework.SourceGenerators.Common.dll"
|
||
Pack="true"
|
||
PackagePath="analyzers/dotnet/cs"
|
||
Visible="false"/>
|
||
|
||
</ItemGroup>
|
||
<ItemGroup>
|
||
<None Include="$(OutputPath)\$(AssemblyName).Abstractions.dll" Pack="true" PackagePath="lib\netstandard2.0" Visible="true"/>
|
||
<None Include="$(OutputPath)\$(AssemblyName).Abstractions.xml" Pack="true" PackagePath="lib\netstandard2.0" Visible="true"/>
|
||
<None Include="$(OutputPath)\$(AssemblyName).Common.dll" Pack="true" PackagePath="lib\netstandard2.0" Visible="true"/>
|
||
<None Include="$(OutputPath)\$(AssemblyName).Common.xml" Pack="true" PackagePath="lib\netstandard2.0" Visible="true"/>
|
||
<None Include="GeWuYou.GFramework.SourceGenerators.targets" Pack="true" PackagePath="build" Visible="false"/>
|
||
</ItemGroup>
|
||
</Project>
|