mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 18:52:08 +08:00
- 将 PackageId 属性从硬编码名称改为 GeWuYou.$(AssemblyName) 模式 - 更新 GFramework.Godot 项目移除重复的 Product 属性 - 修改源代码生成器项目中的 ProjectReference 路径使用 AssemblyName 变量 - 更新源代码生成器项目中 DLL 文件引用使用 AssemblyName 变量 - 调整 targets 文件引用使用 AssemblyName 变量保持一致性 - 消除项目配置中的硬编码依赖提高维护性
64 lines
3.0 KiB
XML
64 lines
3.0 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
||
|
||
<PropertyGroup>
|
||
<PackageId>GeWuYou.$(AssemblyName)</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="..\$(AssemblyName).Abstractions\$(AssemblyName).Abstractions.csproj" PrivateAssets="all"/>
|
||
<ProjectReference Include="..\$(AssemblyName).Common\$(AssemblyName).Common.csproj" PrivateAssets="all"/>
|
||
<ProjectReference Include="..\GFramework.Core.Abstractions\GFramework.Core.Abstractions.csproj" PrivateAssets="all"/>
|
||
</ItemGroup>
|
||
|
||
<!-- ★关键:只把 Generator DLL 放进 analyzers -->
|
||
<ItemGroup>
|
||
<!-- Generator 本体 -->
|
||
<None Include="$(OutputPath)\$(AssemblyName).dll"
|
||
Pack="true"
|
||
PackagePath="analyzers/dotnet/cs"
|
||
Visible="false"/>
|
||
|
||
<!-- ★ Generator 运行期依赖 -->
|
||
<None Include="$(OutputPath)\$(AssemblyName).Abstractions.dll"
|
||
Pack="true"
|
||
PackagePath="analyzers/dotnet/cs"
|
||
Visible="false"/>
|
||
<!-- ★ Generator 运行期依赖 -->
|
||
<None Include="$(OutputPath)\$(AssemblyName).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.$(AssemblyName).targets" Pack="true" PackagePath="build" Visible="false"/>
|
||
</ItemGroup>
|
||
</Project>
|