-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
146 lines (114 loc) · 8.82 KB
/
Copy pathDirectory.Build.props
File metadata and controls
146 lines (114 loc) · 8.82 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?xml version='1.0' encoding='utf-8'?>
<Project>
<!-- Shipped plugin ZIP versions live in each plugin's plugin.manifest.json.
Use llt-plugin.cmd bump-version, then package and generate-store. -->
<PropertyGroup>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors>CS1591;CA1062;CA2024</WarningsAsErrors>
<PluginSatelliteResourceLanguages>ar;bg;bs;ca;cs;de;el;en;es;fr;hu;it;ja;ko;lv;nl;nl-nl;no;pl;pt;pt-br;ro;ru;sk;tr;uk;uz;uz-latn-uz;vi;zh;zh-hans;zh-hant</PluginSatelliteResourceLanguages>
<IsPluginTestProject>$([System.String]::Copy('$(MSBuildProjectName)').EndsWith('.Tests'))</IsPluginTestProject>
<IsPluginToolProject Condition="'$(IsPluginToolProject)' == ''">False</IsPluginToolProject>
<IsTemplatePluginProject Condition="'$(MSBuildProjectName)' == 'UniversalDeviceToolkit.Plugins.Template'">True</IsTemplatePluginProject>
</PropertyGroup>
<PropertyGroup>
<HostDependenciesDir>$(MSBuildThisFileDirectory)Dependencies\Host\</HostDependenciesDir>
<HostLibPath Condition="'$(HostLibPath)' == ''">$(HostDependenciesDir)UniversalDeviceToolkit.Lib.dll</HostLibPath>
<HostLibPath Condition="!Exists('$(HostLibPath)') AND Exists('$(MSBuildThisFileDirectory)..\UniversalDeviceToolkit\Build\UniversalDeviceToolkit.Lib.dll')">$(MSBuildThisFileDirectory)..\UniversalDeviceToolkit\Build\UniversalDeviceToolkit.Lib.dll</HostLibPath>
<HostLibPluginsPath Condition="'$(HostLibPluginsPath)' == ''">$(HostDependenciesDir)UniversalDeviceToolkit.Lib.Plugins.dll</HostLibPluginsPath>
<HostLibPluginsPath Condition="!Exists('$(HostLibPluginsPath)') AND Exists('$(MSBuildThisFileDirectory)..\UniversalDeviceToolkit\Build\UniversalDeviceToolkit.Lib.Plugins.dll')">$(MSBuildThisFileDirectory)..\UniversalDeviceToolkit\Build\UniversalDeviceToolkit.Lib.Plugins.dll</HostLibPluginsPath>
<HostWpfPath Condition="'$(HostWpfPath)' == ''">$(HostDependenciesDir)Universal Device Toolkit.dll</HostWpfPath>
<HostWpfPath Condition="!Exists('$(HostWpfPath)') AND Exists('$(MSBuildThisFileDirectory)..\UniversalDeviceToolkit\Build\Universal Device Toolkit.dll')">$(MSBuildThisFileDirectory)..\UniversalDeviceToolkit\Build\Universal Device Toolkit.dll</HostWpfPath>
<EnsureHostDependenciesScript>$(MSBuildThisFileDirectory)Scripts\ensure-host-dependencies.ps1</EnsureHostDependenciesScript>
<PowerShellExecutable Condition="'$(PowerShellExecutable)' == '' AND '$(OS)' == 'Windows_NT'">powershell</PowerShellExecutable>
<PowerShellExecutable Condition="'$(PowerShellExecutable)' == '' AND '$(OS)' != 'Windows_NT'">pwsh</PowerShellExecutable>
</PropertyGroup>
<PropertyGroup Condition="'$(UseWPF)' == 'true' AND '$(MSBuildProjectName)' != 'UniversalDeviceToolkit.Plugins.SDK' AND '$(IsPluginToolProject)' != 'True' AND '$(IsPluginTestProject)' != 'True'">
<TargetFramework>net10.0-windows</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectName)' == 'UniversalDeviceToolkit.Plugins.SDK'">
<TargetFramework>net10.0-windows</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectName)' != 'UniversalDeviceToolkit.Plugins.SDK' AND '$(IsPluginTestProject)' != 'True' AND '$(IsPluginToolProject)' != 'True'">
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectName)' != 'UniversalDeviceToolkit.Plugins.SDK' AND '$(IsPluginTestProject)' != 'True' AND '$(IsPluginToolProject)' != 'True'">
<Copyright>© 2025-2026 SSC-STUDIO</Copyright>
<NeutralLanguage>en</NeutralLanguage>
<Authors>SSC-STUDIO</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
<PropertyGroup Condition="'$(UseWPF)' == 'true' AND '$(IsPluginToolProject)' != 'True'">
<UseCommonControls>true</UseCommonControls>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectName)' != 'UniversalDeviceToolkit.Plugins.SDK' AND '$(IsPluginTestProject)' != 'True' AND '$(IsPluginToolProject)' != 'True'">
<!-- Plugin ZIPs must carry non-host NuGet sidecars such as Logging.Abstractions and AsyncLock. -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<GenerateDependencyFile>false</GenerateDependencyFile>
<GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(UseWPF)' == 'true' AND '$(IsPluginToolProject)' != 'True'">
<SatelliteResourceLanguages>$(PluginSatelliteResourceLanguages)</SatelliteResourceLanguages>
</PropertyGroup>
<ItemGroup>
<PackageReference Update="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Update="Microsoft.Extensions.Logging" Version="8.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(MSBuildProjectName)' != 'UniversalDeviceToolkit.Plugins.SDK' AND '$(IsPluginTestProject)' != 'True' AND '$(IsPluginToolProject)' != 'True'">
<Reference Include="UniversalDeviceToolkit.Lib">
<HintPath>$(HostLibPath)</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UniversalDeviceToolkit.Lib.Plugins">
<HintPath>$(HostLibPluginsPath)</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup Condition="'$(UseWPF)' == 'true' AND '$(MSBuildProjectName)' != 'UniversalDeviceToolkit.Plugins.SDK' AND '$(IsPluginTestProject)' != 'True' AND '$(IsPluginToolProject)' != 'True'">
<PackageReference Include="WPF-UI" Version="4.3.0" />
</ItemGroup>
<ItemGroup Condition="'$(UseWPF)' == 'true' AND '$(MSBuildProjectName)' != 'UniversalDeviceToolkit.Plugins.SDK' AND '$(IsPluginTestProject)' != 'True' AND '$(IsPluginToolProject)' != 'True' AND Exists('plugin.manifest.json')">
<None Include="plugin.manifest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="EnsureHostDependencies"
BeforeTargets="ResolveReferences"
Condition="'$(IsTemplatePluginProject)' != 'True' AND Exists('$(EnsureHostDependenciesScript)') AND (!Exists('$(HostDependenciesDir)UniversalDeviceToolkit.Lib.dll') OR !Exists('$(HostDependenciesDir)UniversalDeviceToolkit.Lib.Plugins.dll') OR !Exists('$(HostDependenciesDir)Universal Device Toolkit.dll') OR !Exists('$(HostDependenciesDir)Serilog.dll') OR !Exists('$(HostDependenciesDir)Serilog.Sinks.Async.dll') OR !Exists('$(HostDependenciesDir)Serilog.Sinks.File.dll'))">
<Message Importance="high" Text="Host dependencies are missing from Dependencies\Host. Bootstrapping required host binaries..." />
<Exec Command=""$(PowerShellExecutable)" -NoProfile -ExecutionPolicy Bypass -File "$(EnsureHostDependenciesScript)""
WorkingDirectory="$(MSBuildThisFileDirectory)" />
</Target>
<Target Name="CleanupPluginOutput" AfterTargets="Build" Condition="'$(MSBuildProjectName)' != 'UniversalDeviceToolkit.Plugins.SDK' AND '$(IsPluginTestProject)' != 'True' AND '$(IsPluginToolProject)' != 'True' AND '$(IsTemplatePluginProject)' != 'True'">
<ItemGroup>
<FilesToDelete Include="$(OutputPath)*.deps.json" />
<FilesToDelete Include="$(OutputPath)*.runtimeconfig.json" />
<FilesToDelete Include="$(OutputPath)Universal Device Toolkit.*" />
<FilesToDelete Include="$(OutputPath)UniversalDeviceToolkit.WPF.*" />
<FilesToDelete Include="$(OutputPath)UniversalDeviceToolkit.Lib.*" />
<FilesToDelete Include="$(OutputPath)UniversalDeviceToolkit.Lib.Macro.*" />
<FilesToDelete Include="$(OutputPath)UniversalDeviceToolkit.Lib.Automation.*" />
<FilesToDelete Include="$(OutputPath)UniversalDeviceToolkit.CLI.Lib.*" />
</ItemGroup>
<Delete Files="@(FilesToDelete)" ContinueOnError="true" />
<RemoveDir Directories="$(OutputPath)\tools" ContinueOnError="true" />
</Target>
<Target Name="CopySDKToPluginOutput" AfterTargets="CleanupPluginOutput" Condition="'$(MSBuildProjectName)' != 'UniversalDeviceToolkit.Plugins.SDK' AND '$(IsPluginTestProject)' != 'True' AND '$(IsPluginToolProject)' != 'True' AND '$(IsTemplatePluginProject)' != 'True'">
<PropertyGroup>
<SDKDllSource>$(MSBuildThisFileDirectory)Build\SDK\UniversalDeviceToolkit.Plugins.SDK.dll</SDKDllSource>
</PropertyGroup>
<Copy SourceFiles="$(SDKDllSource)" DestinationFolder="$(OutputPath)" Condition="Exists('$(SDKDllSource)')" ContinueOnError="true" />
</Target>
</Project>