EnvironmentVariables.csproj
1 <Project Sdk="Microsoft.NET.Sdk"> 2 <!-- Look at Directory.Build.props in root for common stuff as well --> 3 <Import Project="$(RepoRoot)src\Common.Dotnet.CsWinRT.props" /> 4 <Import Project="$(RepoRoot)src\Common.SelfContained.props" /> 5 6 <PropertyGroup> 7 <OutputType>WinExe</OutputType> 8 <RootNamespace>EnvironmentVariables</RootNamespace> 9 <ApplicationManifest>app.manifest</ApplicationManifest> 10 <UseWinUI>true</UseWinUI> 11 <Platforms>x64;ARM64</Platforms> 12 <EnableMsixTooling>true</EnableMsixTooling> 13 <EnablePreviewMsixTooling>true</EnablePreviewMsixTooling> 14 <WindowsPackageType>None</WindowsPackageType> 15 <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> 16 <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> 17 <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained> 18 <DefineConstants>DISABLE_XAML_GENERATED_MAIN,TRACE</DefineConstants> 19 <OutputPath>$(RepoRoot)$(Platform)\$(Configuration)\WinUI3Apps</OutputPath> 20 <AssemblyName>PowerToys.EnvironmentVariables</AssemblyName> 21 <ApplicationIcon>Assets\EnvironmentVariables\EnvironmentVariables.ico</ApplicationIcon> 22 <!-- MRT from windows app sdk will search for a pri file with the same name of the module before defaulting to resources.pri --> 23 <ProjectPriFileName>PowerToys.EnvironmentVariables.pri</ProjectPriFileName> 24 </PropertyGroup> 25 26 <ItemGroup> 27 <Page Remove="EnvironmentVariablesXAML\App.xaml" /> 28 </ItemGroup> 29 <ItemGroup> 30 <ApplicationDefinition Include="EnvironmentVariablesXAML\App.xaml" /> 31 </ItemGroup> 32 <ItemGroup> 33 <Folder Include="EnvironmentVariablesXAML\" /> 34 </ItemGroup> 35 36 <Target Name="CopyPRIFileToOutputDir" AfterTargets="Build"> 37 <Message Text="Executing CopyPRIFileToOutputDir task" Importance="High" /> 38 39 <ItemGroup> 40 <PRIFile Include="$(OutDir)**\PowerToys.EnvironmentVariablesUILib.pri" /> 41 </ItemGroup> 42 43 <Copy SourceFiles="@(PRIFile)" DestinationFolder="$(OutDir)" /> 44 45 <Message Text="Copied CopyPRIFileToOutputDir files" Importance="High" /> 46 </Target> 47 48 <!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info --> 49 <PropertyGroup> 50 <CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes> 51 <CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir> 52 <ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles> 53 </PropertyGroup> 54 55 <ItemGroup> 56 <!-- HACK: Common.UI is referenced, even if it is not used, to force dll versions to be the same as in other projects that use it. It's still unclear why this is the case, but this is need for flattening the install directory. --> 57 <ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" /> 58 <ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" /> 59 <ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" /> 60 <ProjectReference Include="..\EnvironmentVariablesUILib\EnvironmentVariablesUILib.csproj" /> 61 </ItemGroup> 62 63 <ItemGroup> 64 <PackageReference Include="Microsoft.Extensions.Hosting" /> 65 <PackageReference Include="Microsoft.WindowsAppSDK" /> 66 <PackageReference Include="Microsoft.Windows.SDK.BuildTools" /> 67 <PackageReference Include="WinUIEx" /> 68 <!-- HACK: To make sure the version pulled in by Microsoft.Extensions.Hosting is current. --> 69 <PackageReference Include="System.Text.Json" /> 70 <!-- This line forces the WebView2 version used by Windows App SDK to be the one we expect from Directory.Packages.props . --> 71 <PackageReference Include="Microsoft.Web.WebView2" /> 72 <!-- HACK: CmdPal uses CommunityToolkit.Common directly. Align the version. --> 73 <PackageReference Include="CommunityToolkit.Common" /> 74 <Manifest Include="$(ApplicationManifest)" /> 75 </ItemGroup> 76 77 <!-- 78 Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging 79 Tools extension to be activated for this project even if the Windows App SDK Nuget 80 package has not yet been restored. 81 --> 82 <ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'"> 83 <ProjectCapability Include="Msix" /> 84 </ItemGroup> 85 86 <!-- 87 Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution 88 Explorer "Package and Publish" context menu entry to be enabled for this project even if 89 the Windows App SDK Nuget package has not yet been restored. 90 --> 91 <PropertyGroup Condition="'$(DisableHasPackageAndPublishMenuAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'"> 92 <HasPackageAndPublishMenu>true</HasPackageAndPublishMenu> 93 </PropertyGroup> 94 </Project>