Repository navigation
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
78 lines (68 loc) · 4.11 KB
/
Copy pathDirectory.Build.props
File metadata and controls
78 lines (68 loc) · 4.11 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
69
70
71
72
73
74
75
76
77
78
<Project>
<PropertyGroup>
<TargetFramework>net11.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<!--
本仓库产出三个包,共用这个版本号:
VelaShell.PluginSdk 契约程序集
VelaShell.PluginSdk.Testing 测试替身
VelaShell.PluginSdk.Build 插件工程只需引用的那一个包(targets + 打包器 + 宿主版本校验)
.Build 于 2026-09-11 从 velashell-plugin-cli 搬来,要的就是这个"共用版本号":
它引用契约走 ProjectReference,发给插件工程的那份契约与本仓库这一版永远是同一个东西,
于是"引用哪一版契约"这个旋钮连同它漂移的可能一并消失。
插件工程出包用的打包器也在本仓库:src/VelaShell.PluginSdk.Packer(IsPackable=false,
只以构建产物的形式躺在 .Build 包的 tools/ 下)。它与契约走同一次构建,
"打包器与契约同版本"因此是构建出来的事实,不是版本号约定。
**与其余工具链解耦**(2026-08-27 拆库起):vela-plugin 在
VelaShell/velashell-plugin-cli,dotnet new 模板在 VelaShell/velashell-plugin-templates,
三者各有各的版本号。SDK 发 1.6.0 不要求 CLI 跟着发;CLI 发 1.5.3 也不代表契约动了。
本仓库**不引用**那两个仓库的任何东西 —— 依赖方向是单向的,没有环。
与宿主版本同样无关:VelaShell 主程序发 1.2.3 不代表插件契约变了。
CI 发包时用 -p:VelaSdkVersion= 覆盖(取自 Release 标签)。
-->
<VelaSdkVersion Condition="'$(VelaSdkVersion)' == ''">2.1.3</VelaSdkVersion>
<!-- 去掉预发布后缀的数字版(AssemblyVersion/FileVersion 不接受后缀)与主版本号。 -->
<VelaSdkVersionCore>$([System.Text.RegularExpressions.Regex]::Replace($(VelaSdkVersion), '-.*$', ''))</VelaSdkVersionCore>
<VelaSdkMajor>$([System.Text.RegularExpressions.Regex]::Replace($(VelaSdkVersionCore), '\..*$', ''))</VelaSdkMajor>
<Version>$(VelaSdkVersion)</Version>
<AssemblyVersion>$(VelaSdkVersionCore)</AssemblyVersion>
<FileVersion>$(VelaSdkVersionCore)</FileVersion>
<!-- 不把 git 提交哈希拼进 InformationalVersion(默认会加 +sha 后缀)。 -->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>
<PropertyGroup>
<Authors>joesdu</Authors>
<PackagePrefix>VelaShell</PackagePrefix>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/VelaShell/velashell-plugin-sdk</RepositoryUrl>
<GenerateAssemblyConfigurationAttribute>True</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>True</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>True</GenerateAssemblyProductAttribute>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net11.0'">
<EnablePreviewFeatures>true</EnablePreviewFeatures>
<Features>$(Features);runtime-async=on</Features>
<NoWarn>$(NoWarn);CA2252;SYSLIB5007;</NoWarn>
</PropertyGroup>
<ItemGroup>
<None Include=".\README.md" Pack="true" PackagePath="" />
</ItemGroup>
<PropertyGroup>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);IDE0047;</NoWarn>
</PropertyGroup>
<PropertyGroup>
<!-- 强名称密钥。宿主(Release 下签名)引用 VelaShell.PluginSdk,已签名程序集不能引用
未签名程序集,因此 SDK 必须用**与宿主同一把**钥匙签名。密钥不入库
(.gitignore 里 *.snk),CI 从 STRONG_NAME_KEY 机密还原到这里;
本地日常构建走 Debug,不需要它。
注:vela-plugin 与 VelaShell.PluginSdk.Build 都不签名 —— 未签名程序集**可以**
引用已签名的,方向是对的,所以 cli 仓库不需要这把钥匙。 -->
<VelaStrongNameKey Condition="'$(VelaStrongNameKey)' == ''">$(MSBuildThisFileDirectory)VelaShell.snk</VelaStrongNameKey>
</PropertyGroup>
</Project>