GFramework/GFramework.SourceGenerators/GFramework.SourceGenerators.csproj
GwWuYou 6dd79b8e9a chore(build): 更新项目目标框架和构建配置
- 将多个项目的TargetFramework从netstandard2.0更新为net8.0;net9.0;net10.0
- 优化Directory.Build.props中的注释和配置说明
- 添加缺失的using System;引用
- 调整资源加载系统命名空间从GFramework.Godot.system到GFramework.Godot.assets
- 修正ILogger.cs中的异常消息格式
- 移除BindableProperty.cs中多余的可空断言操作符
2025-12-28 10:45:07 +08:00

64 lines
3.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>GeWuYou.GFramework.SourceGenerators</PackageId>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<!-- 这是 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>