This repository was archived by the owner on Aug 27, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
91 lines (81 loc) · 4.95 KB
/
Copy pathDirectory.Build.props
File metadata and controls
91 lines (81 loc) · 4.95 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
79
80
81
82
83
84
85
86
87
88
89
90
91
<Project>
<PropertyGroup>
<TargetFramework>net11.0</TargetFramework>
</PropertyGroup>
<!-- 定义 Linux -->
<PropertyGroup>
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLinux)' == 'true'">
<DefineConstants>$(DefineConstants);LINUX</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<!-- 插件 SDK 系列包(VelaShell.PluginSdk / .Testing / .Build、VelaShell.Plugin.Cli、
VelaShell.Plugin.Templates)共用这个版本号。第一方插件已搬去 joesdu/velashell-plugins,
有自己的发行版本号(VelaPluginsVersion),与这里无关 —— SDK 发 1.5.0 不代表插件
必须跟着发,插件发 1.4.1 也不代表契约动了。
**与宿主版本解耦**:VelaShell 主程序发 1.2.3 不代表插件契约变了,插件作者也不该
为了跟版本号而重新编译。CI 发包时用 -p:VelaSdkVersion= 覆盖(取自 Release 标签)。 -->
<VelaSdkVersion Condition="'$(VelaSdkVersion)' == ''">1.5.0</VelaSdkVersion>
<!-- 去掉预发布后缀的数字版(AssemblyVersion/FileVersion 不接受后缀)与主版本号。 -->
<VelaSdkVersionCore>$([System.Text.RegularExpressions.Regex]::Replace($(VelaSdkVersion), '-.*$', ''))</VelaSdkVersionCore>
<VelaSdkMajor>$([System.Text.RegularExpressions.Regex]::Replace($(VelaSdkVersionCore), '\..*$', ''))</VelaSdkMajor>
<!-- 本仓库统一版本号(SDK 系列包在 plugin-sdk/Directory.Build.props 里另行显式设定,
值相同,写两处是为了让"包版本"这件事在包工程附近可见)。 -->
<Version>$(VelaSdkVersion)</Version>
<AssemblyVersion>$(VelaSdkVersionCore)</AssemblyVersion>
<FileVersion>$(VelaSdkVersionCore)</FileVersion>
<!-- 不把 git 提交哈希拼进 InformationalVersion(默认会加 +sha 后缀)。 -->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>
<PropertyGroup>
<!-- 插件与宿主必须用同一版本的 Avalonia:装载器强制让 Avalonia* 回落到宿主那一套
(见宿主的 PluginAssemblyLoadContext),版本不一致时表现为跨 ALC 的控件类型对不上。
**本仓库是这个版本号的唯一权威**:VelaShell.PluginSdk.Build 用精确区间 [x.y.z]
把它锁给所有插件工程,同时 VelaShell.PluginSdk 包在 buildTransitive 里把它
导出成 $(VelaSdkPinnedAvaloniaVersion) —— 宿主仓库据此在构建期核对自己引用的
Avalonia 是否与 SDK 锁的一致(见宿主 src/Directory.Build.targets 的
VerifyAvaloniaMatchesSdk)。改这里 = 改插件生态的 Avalonia 版本,
必须与宿主同一波发布。 -->
<VelaAvaloniaVersion>12.1.1</VelaAvaloniaVersion>
<!-- AvaloniaEdit 走自己的版本线(程序集名 AvaloniaEdit 同样命中装载器的 "Avalonia" 前缀,
运行时一律回落到宿主那份),因此同样必须与宿主一致。 -->
<VelaAvaloniaEditVersion>12.0.0</VelaAvaloniaEditVersion>
</PropertyGroup>
<PropertyGroup>
<Authors>joesdu</Authors>
<PackagePrefix>VelaShell</PackagePrefix>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/joesdu/velashell-plugin-toolchain</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>
<VelaRepoRoot>$(MSBuildThisFileDirectory)</VelaRepoRoot>
<VelaArtifactsDir Condition="'$(VelaArtifactsDir)' == ''">$(VelaRepoRoot)artifacts</VelaArtifactsDir>
</PropertyGroup>
<PropertyGroup>
<!-- 强名称密钥。宿主(Release 下签名)引用 VelaShell.PluginSdk,已签名程序集不能引用
未签名程序集,因此 SDK 必须用**与宿主同一把**钥匙签名。密钥不入库
(.gitignore 里 *.snk),CI 从 STRONG_NAME_KEY 机密还原到这里;
本地日常构建走 Debug,不需要它。 -->
<VelaStrongNameKey Condition="'$(VelaStrongNameKey)' == ''">$(MSBuildThisFileDirectory)VelaShell.snk</VelaStrongNameKey>
</PropertyGroup>
</Project>