修复引用丢失问题

This commit is contained in:
ShrlAlgo
2025-09-04 16:10:58 +08:00
parent 8251f80f0b
commit c8cac7811e
3 changed files with 19 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
<!-- 包信息 -->
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>RevitGen</PackageId>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
<Authors>ShrlAlgo</Authors>
<PackageProjectUrl>https://www.shrlalgo.cn/</PackageProjectUrl>
<RepositoryUrl>https://github.com/ShrlAlgo/RevitGen</RepositoryUrl>
@@ -23,19 +23,17 @@
<ItemGroup>
<!-- 1. 将 Common.dll 打包到 lib/ 目录 -->
<None Include="..\RevitGen.Common\bin\$(Configuration)\netstandard2.0\RevitGen.Common.dll" Pack="true" PackagePath="ref\netstandard2.0" />
<None Include="..\RevitGen.Common\bin\$(Configuration)\netstandard2.0\RevitGen.Common.dll" Pack="true" PackagePath="lib\netstandard2.0" />
<!-- 2. 将 Generator.dll 打包到 analyzers/ 目录 -->
<None Include="..\RevitGen.Generator\bin\$(Configuration)\netstandard2.0\RevitGen.Generator.dll" Pack="true" PackagePath="analyzers\dotnet\cs" />
<!-- 3. 将新创建的 .targets 文件打包到 build/ 目录 -->
<None Include="build\RevitGen.targets" Pack="true" PackagePath="build" />
<None Include="..\README.md" Pack="true" PackagePath="\" />
<None Include="..\LICENSE" Pack="true" PackagePath="\" />
<!--
我们仍然保留 ProjectReference但它的作用变了
它不再负责打包,而是只负责【确保正确的编译顺序】。
`ReferenceOutputAssembly="false"` 可以防止循环依赖。
-->
<ProjectReference Include="..\RevitGen.Common\RevitGen.Common.csproj" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\RevitGen.Generator\RevitGen.Generator.csproj" ReferenceOutputAssembly="false" />
</ItemGroup>

View File

@@ -0,0 +1,13 @@
<Project>
<ItemGroup>
<!--
这会告诉使用此包的项目,需要引用一个额外的程序集。
$(MSBuildThisFileDirectory) 是这个 .targets 文件所在的目录 (即 build/)。
我们用它来定位到我们打包进来的 Common.dll。
-->
<Reference Include="RevitGen.Common">
<HintPath>$(MSBuildThisFileDirectory)..\lib\netstandard2.0\RevitGen.Common.dll</HintPath>
<PrivateAssets>all</PrivateAssets>
</Reference>
</ItemGroup>
</Project>

View File

@@ -15,7 +15,7 @@
<Reference Include="Microsoft.CSharp" />
<PackageReference Include="Nice3point.Revit.Api.RevitAPI" Version="2020.2.60" />
<PackageReference Include="Nice3point.Revit.Api.RevitAPIUI" Version="2020.2.60" />
<PackageReference Include="RevitGen" Version="1.0.0" />
<PackageReference Include="RevitGen" Version="1.0.2" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">