修复nuget dll引用失败

This commit is contained in:
ShrlAlgo
2025-09-04 14:53:00 +08:00
parent 7eca4354eb
commit b021bded67
2 changed files with 27 additions and 3 deletions

View File

@@ -4,8 +4,11 @@
<!-- 包信息 -->
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>RevitGen</PackageId>
<Version>1.0.0</Version>
<Version>1.0.1</Version>
<Authors>ShrlAlgo</Authors>
<PackageProjectUrl>https://www.shrlalgo.cn/</PackageProjectUrl>
<RepositoryUrl>https://github.com/ShrlAlgo/RevitGen</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Description>A powerful source generator to accelerate Revit add-in development.</Description>
@@ -24,6 +27,9 @@
<!-- 2. 将 Generator.dll 打包到 analyzers/ 目录 -->
<None Include="..\RevitGen.Generator\bin\$(Configuration)\netstandard2.0\RevitGen.Generator.dll" Pack="true" PackagePath="analyzers\dotnet\cs" />
<None Include="build\RevitGen.targets" Pack="true" PackagePath="build" />
<!-- 3. 将新创建的 .targets 文件打包到 build/ 目录 -->
<None Include="..\README.md" Pack="true" PackagePath="\" />
<None Include="..\LICENSE" Pack="true" PackagePath="\" />
<!--
@@ -35,4 +41,9 @@
<ProjectReference Include="..\RevitGen.Generator\RevitGen.Generator.csproj" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
<Folder Include="build\" />
</ItemGroup>
</Project>

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>