Skip to content

Commit d986888

Browse files
committed
优化打包逻辑带上文档
1 parent a0aa149 commit d986888

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

Code/ToolPackager/ToolPackager.csproj

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
</PropertyGroup>
88

99
<PropertyGroup>
10+
<!--
11+
配置为无依赖。即避免带上 TargetFramework=netstandard2.0 的限制
12+
配合 IncludeBuildOutput=false 即可让任意项目引用,无视目标框架
13+
-->
14+
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
15+
1016
<!-- 程序集名不是将打包的 -->
1117
<PackageId>dotnetCampus.UsingMSBuildCopyOutputFileToFastDebug</PackageId>
1218

@@ -36,7 +42,16 @@
3642
<ItemGroup>
3743
<None Include="build\dotnetCampus.UsingMSBuildCopyOutputFileToFastDebug.targets" Pack="True" PackagePath="\build\$(PackageId).targets" />
3844
<None Include="buildMultiTargeting\dotnetCampus.UsingMSBuildCopyOutputFileToFastDebug.targets" Pack="True" PackagePath="\buildMultiTargeting" />
39-
<None Include="$(UsingMSBuildCopyOutputFileToFastDebugOutputPath)**" Pack="true" PackagePath="\tools"/>
45+
<None Include="$(UsingMSBuildCopyOutputFileToFastDebugOutputPath)**" Pack="true" PackagePath="\tools" />
46+
</ItemGroup>
47+
48+
<!-- 以下是打 NuGet 包相关辅助方法 -->
49+
<PropertyGroup>
50+
<PackageReadmeFile>README.md</PackageReadmeFile>
51+
</PropertyGroup>
52+
<ItemGroup>
53+
<!-- 嵌入 README 文件 -->
54+
<None Include="..\..\README.md" Link="README.md" Pack="true" PackagePath="\" Visible="false"/>
4055
</ItemGroup>
4156
</Target>
4257

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
```xml
1818
<ItemGroup Condition=" '$(Configuration)' == 'Debug'">
19-
<PackageReference Include="dotnetCampus.UsingMSBuildCopyOutputFileToFastDebug" Version="1.3.1" />
19+
<PackageReference Include="dotnetCampus.UsingMSBuildCopyOutputFileToFastDebug" Version="1.3.233" />
2020
</ItemGroup>
2121
```
2222

0 commit comments

Comments
 (0)