-
-
Notifications
You must be signed in to change notification settings - Fork 492
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
68 lines (57 loc) · 3.13 KB
/
Copy pathDirectory.Build.props
File metadata and controls
68 lines (57 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!--
============================================================================
Magicodes.IE 依赖治理规则 (Dependency Governance Contract)
============================================================================
1. 版本走 props (Directory.Packages.props)
- 禁止在任何 csproj 中显式写 PackageReference Version="x.y.z"
- 所有版本信息只在 Directory.Packages.props 的 PackageVersion 里声明
2. csproj 只表达"哪些包"和"是否引入"
- 不写 Version,版本由 CPM 决定
- 按"是否引入"维度做 TFM 条件 ItemGroup (e.g. ns2.x vs net6+)
- 禁止按"版本"维度做 TFM 条件 (那是 props 的工作)
3. CPM 默认启用 (ManagePackageVersionsCentrally=true)
- 项目如需 opt-out,必须在 csproj 加注释说明原因
- 当前合法的 opt-out: EPPlus (vendored 图像库,需按 TFM 多版本)
4. 传递依赖漏洞 pin 模式
- props 里的 PackageVersion 不能强制提升传递版本
- 在引入该传递依赖的 csproj 加顶层 PackageReference + 注释说明
- 参考: Magicodes.IE.Excel.NPOI.csproj 的 System.Text.Encodings.Web pin
5. 公共属性集中在此文件
- Version / Authors / Description / PackageTags 等打包元数据
- NoWarn / 编译参数
- 打包相关属性用 Condition="'$(IsPackable)' != 'false'" 包裹,避免影响测试项目
============================================================================
-->
<Project>
<PropertyGroup>
<Version>2.8.5</Version>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<NoWarn>1701;1702;CS1591;CS1573;1591;NU1507</NoWarn>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<NuGetAuditMode>direct</NuGetAuditMode>
</PropertyGroup>
<PropertyGroup Condition="'$(IsPackable)' != 'false'">
<Authors>雪雁</Authors>
<Product>麦扣</Product>
<PackageProjectUrl>https://docs.xin-lai.com/</PackageProjectUrl>
<RepositoryUrl>https://github.com/dotnetcore/Magicodes.IE</RepositoryUrl>
<PackageTags>Magicodes.IE;excel;xlsx;csv;word;pdf;html</PackageTags>
<Description>
Import and export general library, support Dto import and export, template export, fancy export and dynamic export, support Excel, Csv, Word, Pdf and Html.
导入导出通用库,支持Dto导入导出、模板导出、花式导出以及动态导出,支持Excel、Csv、Word、Pdf和Html。
开源库地址:https://github.com/xin-lai
博客地址:http://www.cnblogs.com/codelove/
更新记录:https://github.com/dotnetcore/Magicodes.IE/blob/master/RELEASE.md
公众号:麦扣聊技术
交流QQ群:85318032
</Description>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<ItemGroup Condition="'$(IsPackable)' != 'false' AND '$(ManagePackageVersionsCentrally)' != 'false'">
<PackageReference Include="Microsoft.SourceLink.GitHub">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>