Microsoft.CmdPal.UI.csproj
1 <Project Sdk="Microsoft.NET.Sdk"> 2 <Import Project="$(RepoRoot)src\Common.Dotnet.CsWinRT.props" /> 3 <Import Project="$(RepoRoot)src\Common.Dotnet.AotCompatibility.props" /> 4 <Import Project="$(RepoRoot)src\CmdPalVersion.props" /> 5 <Import Project="CmdPal.pre.props" /> 6 <Import Project="CmdPal.Branding.props" /> 7 8 <PropertyGroup> 9 <OutputType>WinExe</OutputType> 10 <RootNamespace>Microsoft.CmdPal.UI</RootNamespace> 11 <ApplicationManifest>app.manifest</ApplicationManifest> 12 <PublishProfile>win-$(Platform).pubxml</PublishProfile> 13 <UseWinUI>true</UseWinUI> 14 <EnableMsixTooling>true</EnableMsixTooling> 15 <ImplicitUsings>enable</ImplicitUsings> 16 <Nullable>enable</Nullable> 17 <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained> 18 <LangVersion>preview</LangVersion> 19 20 <Version>$(CmdPalVersion)</Version> 21 22 <!-- OutputPath is set in CmdPal.Branding.props --> 23 24 <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> 25 <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> 26 <UseWinRT>true</UseWinRT> 27 </PropertyGroup> 28 29 <!-- For debugging purposes, uncomment this block to enable AOT builds --> 30 <!--<PropertyGroup> 31 <EnableCmdPalAOT>true</EnableCmdPalAOT> 32 <GeneratePackageLocally>true</GeneratePackageLocally> 33 </PropertyGroup>--> 34 35 <PropertyGroup Condition="'$(EnableCmdPalAOT)' == 'true'"> 36 <SelfContained>true</SelfContained> 37 <PublishSingleFile>false</PublishSingleFile> 38 <DisableRuntimeMarshalling>false</DisableRuntimeMarshalling> 39 <PublishAot>true</PublishAot> 40 </PropertyGroup> 41 42 <PropertyGroup Condition="'$(CIBuild)' == 'true' or '$(GeneratePackageLocally)' == 'true'"> 43 <GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild> 44 <AppxBundle>Never</AppxBundle> 45 <AppxPackageTestDir>$(OutputPath)\AppPackages\Microsoft.CmdPal.UI_$(Version)_Test\</AppxPackageTestDir> 46 </PropertyGroup> 47 48 <PropertyGroup> 49 <!-- This lets us actually reference types from Microsoft.Terminal.UI and CmdPalKeyboardService --> 50 <CsWinRTIncludes>Microsoft.Terminal.UI;CmdPalKeyboardService</CsWinRTIncludes> 51 <CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir> 52 </PropertyGroup> 53 54 <PropertyGroup> 55 <!-- This disables the auto-generated main, so we can be single-instanced --> 56 <DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_MAIN</DefineConstants> 57 </PropertyGroup> 58 59 <!-- BODGY: XES Versioning and WinAppSDK get into a fight about the app manifest, which breaks WinAppSDK. --> 60 <Target Name="RearrangeXefVersioningAndWinAppSDKResourceGeneration" DependsOnTargets="GetNewAppManifestValues;CreateWinRTRegistration" BeforeTargets="XesWriteVersionInfoResourceFile"> 61 <PropertyGroup> 62 <!-- XES uses this property to store the "final" location of the app manifest, before it erases it. 63 We have to update it to the value WinAppSDK set it to. --> 64 <OriginalApplicationManifest>$(ApplicationManifest.Replace("$(MSBuildProjectDirectory)\",""))</OriginalApplicationManifest> 65 </PropertyGroup> 66 <Message Importance="High" Text="Updated final manifest path to $(OriginalApplicationManifest)" /> 67 </Target> 68 69 <ItemGroup> 70 <None Remove="Controls\ActionBar.xaml" /> 71 <None Remove="Controls\ColorPalette.xaml" /> 72 <None Remove="Controls\CommandPalettePreview.xaml" /> 73 <None Remove="Controls\DevRibbon.xaml" /> 74 <None Remove="Controls\FallbackRankerDialog.xaml" /> 75 <None Remove="Controls\KeyVisual\KeyCharPresenter.xaml" /> 76 <None Remove="Controls\ScreenPreview.xaml" /> 77 <None Remove="Controls\SearchBar.xaml" /> 78 <None Remove="IsEnabledTextBlock.xaml" /> 79 <None Remove="ListDetailPage.xaml" /> 80 <None Remove="LoadingPage.xaml" /> 81 <None Remove="MainPage.xaml" /> 82 <None Remove="Pages\Settings\ExtensionsPage.xaml" /> 83 <None Remove="Pages\Settings\GeneralPage.xaml" /> 84 <None Remove="SettingsWindow.xaml" /> 85 <None Remove="Settings\AppearancePage.xaml" /> 86 <None Remove="Settings\InternalPage.xaml" /> 87 <None Remove="ShellPage.xaml" /> 88 <None Remove="Styles\Colors.xaml" /> 89 <None Remove="Styles\Settings.xaml" /> 90 <None Remove="Styles\TextBox.xaml" /> 91 <None Remove="Styles\Theme.Normal.xaml" /> 92 </ItemGroup> 93 94 95 <ItemGroup> 96 <PackageReference Include="CommunityToolkit.WinUI.Controls.Primitives" /> 97 <PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" /> 98 <PackageReference Include="CommunityToolkit.WinUI.Converters" /> 99 <PackageReference Include="CommunityToolkit.WinUI.Animations" /> 100 <PackageReference Include="CommunityToolkit.WinUI.Extensions" /> 101 <PackageReference Include="CommunityToolkit.Labs.WinUI.Controls.MarkdownTextBlock" /> 102 <PackageReference Include="Microsoft.Extensions.DependencyInjection" /> 103 <PackageReference Include="Microsoft.Graphics.Win2D" /> 104 <PackageReference Include="Microsoft.Windows.SDK.BuildTools" /> 105 <PackageReference Include="Microsoft.WindowsAppSDK" /> 106 <PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" /> 107 <PackageReference Include="WinUIEx" /> 108 <PackageReference Include="Microsoft.Windows.CsWin32"> 109 <PrivateAssets>all</PrivateAssets> 110 <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> 111 </PackageReference> 112 113 <PackageReference Include="Microsoft.Extensions.Hosting" /> 114 </ItemGroup> 115 116 <!-- 117 Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging 118 Tools extension to be activated for this project even if the Windows App SDK Nuget 119 package has not yet been restored. 120 --> 121 <ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'"> 122 <ProjectCapability Include="Msix" /> 123 </ItemGroup> 124 125 <ItemGroup> 126 <SDKReference Include="Microsoft.VCLibs.Desktop, Version=14.0" /> 127 </ItemGroup> 128 129 <ItemGroup> 130 <ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" /> 131 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.ClipboardHistory\Microsoft.CmdPal.Ext.ClipboardHistory.csproj" /> 132 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.RemoteDesktop\Microsoft.CmdPal.Ext.RemoteDesktop.csproj" /> 133 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.System\Microsoft.CmdPal.Ext.System.csproj" /> 134 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.WebSearch\Microsoft.CmdPal.Ext.WebSearch.csproj" /> 135 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.Indexer\Microsoft.CmdPal.Ext.Indexer.csproj" /> 136 <ProjectReference Include="..\Core\Microsoft.CmdPal.Core.Common\Microsoft.CmdPal.Core.Common.csproj" /> 137 <ProjectReference Include="..\Microsoft.CmdPal.UI.ViewModels\Microsoft.CmdPal.UI.ViewModels.csproj" /> 138 139 <ProjectReference Include="..\extensionsdk\Microsoft.CommandPalette.Extensions.Toolkit\Microsoft.CommandPalette.Extensions.Toolkit.csproj" /> 140 141 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.Apps\Microsoft.CmdPal.Ext.Apps.csproj" /> 142 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.Bookmark\Microsoft.CmdPal.Ext.Bookmarks.csproj" /> 143 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.Calc\Microsoft.CmdPal.Ext.Calc.csproj" /> 144 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.Registry\Microsoft.CmdPal.Ext.Registry.csproj" /> 145 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.Shell\Microsoft.CmdPal.Ext.Shell.csproj" /> 146 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.TimeDate\Microsoft.CmdPal.Ext.TimeDate.csproj" /> 147 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.WindowsServices\Microsoft.CmdPal.Ext.WindowsServices.csproj" /> 148 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.WindowsSettings\Microsoft.CmdPal.Ext.WindowsSettings.csproj" /> 149 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.WindowsTerminal\Microsoft.CmdPal.Ext.WindowsTerminal.csproj" /> 150 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.WindowWalker\Microsoft.CmdPal.Ext.WindowWalker.csproj" /> 151 <ProjectReference Include="..\ext\Microsoft.CmdPal.Ext.WinGet\Microsoft.CmdPal.Ext.WinGet.csproj" /> 152 153 <ProjectReference Include="$(ProjectDir)\..\Microsoft.Terminal.UI\Microsoft.Terminal.UI.vcxproj"> 154 <ReferenceOutputAssembly>False</ReferenceOutputAssembly> 155 <BuildProject>True</BuildProject> 156 </ProjectReference> 157 <!-- WinRT metadata reference --> 158 <CsWinRTInputs Include="$(OutputPath)\Microsoft.Terminal.UI.winmd" /> 159 <!-- Native implementation DLL --> 160 <None Include="$(OutputPath)\Microsoft.Terminal.UI.dll"> 161 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 162 </None> 163 <ProjectReference Include="..\CmdPalKeyboardService\CmdPalKeyboardService.vcxproj"> 164 <ReferenceOutputAssembly>True</ReferenceOutputAssembly> 165 <Private>True</Private> 166 <CopyLocalSatelliteAssemblies>True</CopyLocalSatelliteAssemblies> 167 </ProjectReference> 168 </ItemGroup> 169 170 <ItemGroup> 171 <Page Update="LoadingPage.xaml"> 172 <Generator>MSBuild:Compile</Generator> 173 </Page> 174 <Page Update="ShellPage.xaml"> 175 <Generator>MSBuild:Compile</Generator> 176 </Page> 177 <Page Update="ListDetailPage.xaml"> 178 <Generator>MSBuild:Compile</Generator> 179 </Page> 180 <Page Update="MainPage.xaml"> 181 <Generator>MSBuild:Compile</Generator> 182 </Page> 183 <Page Update="Controls\SearchBar.xaml"> 184 <Generator>MSBuild:Compile</Generator> 185 </Page> 186 <Page Update="Controls\DevRibbon.xaml"> 187 <Generator>MSBuild:Compile</Generator> 188 </Page> 189 <Page Update="Styles\TextBox.xaml"> 190 <XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime> 191 </Page> 192 </ItemGroup> 193 194 <!-- 195 Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution 196 Explorer "Package and Publish" context menu entry to be enabled for this project even if 197 the Windows App SDK Nuget package has not yet been restored. 198 --> 199 <PropertyGroup Condition="'$(DisableHasPackageAndPublishMenuAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'"> 200 <HasPackageAndPublishMenu>true</HasPackageAndPublishMenu> 201 </PropertyGroup> 202 203 <ItemGroup> 204 <Content Update="..\Microsoft.CmdPal.UI.ViewModels\Assets\template.zip"> 205 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 206 </Content> 207 <Content Update="Assets\StoreLogo.dark.svg"> 208 <CopyToOutputDirectory>Never</CopyToOutputDirectory> 209 </Content> 210 <Content Update="Assets\StoreLogo.light.svg"> 211 <CopyToOutputDirectory>Never</CopyToOutputDirectory> 212 </Content> 213 <Content Update="Assets\WinGetLogo.svg"> 214 <CopyToOutputDirectory>Never</CopyToOutputDirectory> 215 </Content> 216 </ItemGroup> 217 218 <ItemGroup> 219 <Page Update="Controls\CommandPalettePreview.xaml"> 220 <Generator>MSBuild:Compile</Generator> 221 </Page> 222 </ItemGroup> 223 224 <ItemGroup> 225 <Page Update="Controls\ScreenPreview.xaml"> 226 <Generator>MSBuild:Compile</Generator> 227 </Page> 228 </ItemGroup> 229 230 <ItemGroup> 231 <Page Update="Controls\ColorPalette.xaml"> 232 <Generator>MSBuild:Compile</Generator> 233 </Page> 234 </ItemGroup> 235 236 <ItemGroup> 237 <Page Update="Controls\FallbackRankerDialog.xaml"> 238 <Generator>MSBuild:Compile</Generator> 239 </Page> 240 </ItemGroup> 241 242 <ItemGroup> 243 <Page Update="Styles\Theme.Colorful.xaml"> 244 <SubType>Designer</SubType> 245 </Page> 246 <Page Update="Styles\Theme.Normal.xaml"> 247 <Generator>MSBuild:Compile</Generator> 248 </Page> 249 </ItemGroup> 250 251 <ItemGroup> 252 <Page Update="Settings\AppearancePage.xaml"> 253 <Generator>MSBuild:Compile</Generator> 254 </Page> 255 </ItemGroup> 256 257 <ItemGroup> 258 <Page Update="IsEnabledTextBlock.xaml"> 259 <Generator>MSBuild:Compile</Generator> 260 </Page> 261 </ItemGroup> 262 263 <ItemGroup> 264 <Page Update="Controls\KeyVisual\KeyCharPresenter.xaml"> 265 <Generator>MSBuild:Compile</Generator> 266 </Page> 267 </ItemGroup> 268 <ItemGroup> 269 <Page Update="Settings\InternalPage.xaml"> 270 <Generator>MSBuild:Compile</Generator> 271 </Page> 272 </ItemGroup> 273 <ItemGroup> 274 <Page Update="Styles\Colors.xaml"> 275 <Generator>MSBuild:Compile</Generator> 276 </Page> 277 </ItemGroup> 278 <ItemGroup> 279 <Page Update="Styles\Settings.xaml"> 280 <Generator>MSBuild:Compile</Generator> 281 </Page> 282 </ItemGroup> 283 <ItemGroup> 284 <Page Update="Pages\Settings\ExtensionsPage.xaml"> 285 <Generator>MSBuild:Compile</Generator> 286 </Page> 287 </ItemGroup> 288 <ItemGroup> 289 <Page Update="SettingsWindow.xaml"> 290 <Generator>MSBuild:Compile</Generator> 291 </Page> 292 </ItemGroup> 293 <ItemGroup> 294 <Page Update="Pages\Settings\GeneralPage.xaml"> 295 <Generator>MSBuild:Compile</Generator> 296 </Page> 297 </ItemGroup> 298 <!-- </AdaptiveCardsWorkaround> --> 299 300 <!-- Build information --> 301 <PropertyGroup Condition=" '$(PublishAot)' == 'true' "> 302 <DefineConstants>$(DefineConstants);BUILD_INFO_PUBLISH_AOT</DefineConstants> 303 </PropertyGroup> 304 <PropertyGroup Condition=" '$(PublishTrimmed)' == 'true' "> 305 <DefineConstants>$(DefineConstants);BUILD_INFO_PUBLISH_TRIMMED</DefineConstants> 306 </PropertyGroup> 307 <PropertyGroup Condition=" '$(CIBuild)' == 'true' "> 308 <DefineConstants>$(DefineConstants);BUILD_INFO_CIBUILD</DefineConstants> 309 </PropertyGroup> 310 311 </Project>