mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
148 lines
10 KiB
XML
148 lines
10 KiB
XML
<Project>
|
|
<Import Project="src\Version.props" />
|
|
<PropertyGroup>
|
|
<Copyright>Copyright (C) Microsoft Corporation. All rights reserved.</Copyright>
|
|
<AssemblyCopyright>Copyright (C) Microsoft Corporation. All rights reserved.</AssemblyCopyright>
|
|
<AssemblyProduct>PowerToys</AssemblyProduct>
|
|
<AssemblyCompany>Microsoft Corp.</AssemblyCompany>
|
|
<Company>Microsoft Corporation</Company>
|
|
<Authors>Microsoft Corporation</Authors>
|
|
<Product>PowerToys</Product>
|
|
<NeutralLanguage>en-US</NeutralLanguage>
|
|
<Platforms>x64;ARM64</Platforms>
|
|
<PackageTags>PowerToys</PackageTags>
|
|
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
|
<AnalysisMode>Recommended</AnalysisMode>
|
|
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>
|
|
<NuGetAuditMode>direct</NuGetAuditMode>
|
|
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> <!-- Don't add source revision hash to the product version of binaries. -->
|
|
<PlatformTarget>$(Platform)</PlatformTarget>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
|
|
<Version>$(Version).0</Version>
|
|
<RepositoryUrl>https://github.com/microsoft/PowerToys</RepositoryUrl>
|
|
<RepositoryType>GitHub</RepositoryType>
|
|
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
<EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild>
|
|
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
|
|
<RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
|
|
<!-- Disable ALL StyleCop warnings -->
|
|
<NoWarn>$(NoWarn);SA0001;SA1000;SA1001;SA1002;SA1003;SA1004;SA1005;SA1006;SA1007;SA1008;SA1009;SA1010;SA1011;SA1012;SA1013;SA1014;SA1015;SA1016;SA1017;SA1018;SA1019;SA1020;SA1021;SA1022;SA1023;SA1024;SA1025;SA1026;SA1027;SA1028</NoWarn>
|
|
<NoWarn>$(NoWarn);SA1100;SA1101;SA1102;SA1103;SA1104;SA1105;SA1106;SA1107;SA1108;SA1109;SA1110;SA1111;SA1112;SA1113;SA1114;SA1115;SA1116;SA1117;SA1118;SA1119;SA1120;SA1121;SA1122;SA1123;SA1124;SA1125;SA1126;SA1127;SA1128;SA1129;SA1130;SA1131;SA1132;SA1133;SA1134;SA1135;SA1136;SA1137;SA1138;SA1139</NoWarn>
|
|
<NoWarn>$(NoWarn);SA1200;SA1201;SA1202;SA1203;SA1204;SA1205;SA1206;SA1207;SA1208;SA1209;SA1210;SA1211;SA1212;SA1213;SA1214;SA1215;SA1216;SA1217</NoWarn>
|
|
<NoWarn>$(NoWarn);SA1300;SA1301;SA1302;SA1303;SA1304;SA1305;SA1306;SA1307;SA1308;SA1309;SA1310;SA1311;SA1312;SA1313;SA1314</NoWarn>
|
|
<NoWarn>$(NoWarn);SA1400;SA1401;SA1402;SA1403;SA1404;SA1405;SA1406;SA1407;SA1408;SA1409;SA1410;SA1411;SA1412;SA1413</NoWarn>
|
|
<NoWarn>$(NoWarn);SA1500;SA1501;SA1502;SA1503;SA1504;SA1505;SA1506;SA1507;SA1508;SA1509;SA1510;SA1511;SA1512;SA1513;SA1514;SA1515;SA1516;SA1517;SA1518;SA1519;SA1520</NoWarn>
|
|
<NoWarn>$(NoWarn);SA1600;SA1601;SA1602;SA1603;SA1604;SA1605;SA1606;SA1607;SA1608;SA1609;SA1610;SA1611;SA1612;SA1613;SA1614;SA1615;SA1616;SA1617;SA1618;SA1619;SA1620;SA1621;SA1622;SA1623;SA1624;SA1625;SA1626;SA1627;SA1628;SA1629;SA1630;SA1631;SA1632;SA1633;SA1634;SA1635;SA1636;SA1637;SA1638;SA1639;SA1640;SA1641;SA1642;SA1643;SA1644;SA1645;SA1646;SA1647;SA1648;SA1649;SA1650;SA1651;SA1652</NoWarn>
|
|
<!-- Disable specific Code Analysis warnings -->
|
|
<NoWarn>$(NoWarn);CA1001;CA1002;CA1003;CA1004;CA1005;CA1006;CA1007;CA1008;CA1009;CA1010;CA1011;CA1012;CA1013;CA1014;CA1016;CA1017;CA1018;CA1019;CA1020;CA1021;CA1022;CA1023;CA1024;CA1025;CA1026;CA1027;CA1028;CA1030;CA1031;CA1032;CA1033;CA1034;CA1035;CA1036;CA1038;CA1039;CA1040;CA1041;CA1043;CA1044;CA1045;CA1046;CA1047;CA1048;CA1049;CA1050;CA1051;CA1052;CA1053;CA1054;CA1055;CA1056;CA1057;CA1058;CA1059;CA1060;CA1061;CA1062;CA1063;CA1064;CA1065;CA1066;CA1067;CA1068;CA1069</NoWarn>
|
|
<NoWarn>$(NoWarn);CA1305;CA1401;CA1806;CA1816;CA1825;CA2101;CA2201</NoWarn>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<_PropertySheetDisplayName>PowerToys.Root.Props</_PropertySheetDisplayName>
|
|
<ForceImportBeforeCppProps>$(MsbuildThisFileDirectory)\Cpp.Build.props</ForceImportBeforeCppProps>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.csproj' AND '$(DisableStyleCop)' != 'true'">
|
|
<PackageReference Include="StyleCop.Analyzers">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
<Compile Include="$(MSBuildThisFileDirectory)\src\codeAnalysis\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
|
|
<AdditionalFiles Include="$(MSBuildThisFileDirectory)\src\codeAnalysis\StyleCop.json" Link="StyleCop.json" />
|
|
|
|
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
</ItemGroup>
|
|
|
|
<!-- Add ability to run tests via "msbuild /t:Test" -->
|
|
<!--
|
|
Work around an MSBuild bug where Microsoft.Common.Test.targets is missing from the Arm64 installation.
|
|
See: https://github.com/dotnet/msbuild/pull/9984
|
|
NB 1: This means that using "/t:Test" is not supported for Arm64 builds and tests will need to be run in an alternate way,
|
|
eg running tests in VS or invoking vstest.console directly.
|
|
NB 2: <Sdk> elements do not support conditions, so this is also being worked around.
|
|
Once the change referenced above is fixed, the ImportGroup below can be replaced with:
|
|
<Sdk Name="Microsoft.Build.RunVSTest" Version="1.0.319" />
|
|
-->
|
|
<ImportGroup Condition="'$(PROCESSOR_ARCHITECTURE)' != 'ARM64'">
|
|
<Import Project="Sdk.props" Sdk="Microsoft.Build.RunVSTest" Version="1.0.319" />
|
|
<Import Project="Sdk.targets" Sdk="Microsoft.Build.RunVSTest" Version="1.0.319" />
|
|
</ImportGroup>
|
|
<PropertyGroup>
|
|
<VSTestLogger>trx</VSTestLogger>
|
|
<!--
|
|
RunVSTest by default uses %VSINSTALLDIR%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe,
|
|
but some of the CI scenarios don't define %VSINSTALLDIR%, so be explicit about where to look for vstest.
|
|
Note: $(VsInstallRoot) is a built-in MSBuild property, so should always be defined.
|
|
-->
|
|
<VSTestToolPath>$(VsInstallRoot)\Common7\IDE\CommonExtensions\Microsoft\TestWindow</VSTestToolPath>
|
|
<!-- No arm64 agents to run the tests. -->
|
|
<RunVSTest Condition="'$(Platform)' == 'ARM64'">false</RunVSTest>
|
|
</PropertyGroup>
|
|
|
|
<!-- MSBuildCache -->
|
|
<PropertyGroup>
|
|
<!-- Off by default -->
|
|
<MSBuildCacheEnabled Condition="'$(MSBuildCacheEnabled)' == ''">false</MSBuildCacheEnabled>
|
|
|
|
<!-- In Azure pipelines, use Pipeline Caching as the cache storage backend. Otherwise, use the local cache. -->
|
|
<MSBuildCachePackageName Condition="'$(TF_BUILD)' != ''">Microsoft.MSBuildCache.AzurePipelines</MSBuildCachePackageName>
|
|
<MSBuildCachePackageName Condition="'$(MSBuildCachePackageName)' == ''">Microsoft.MSBuildCache.Local</MSBuildCachePackageName>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(MSBuildCacheEnabled)' == 'true'">
|
|
<!-- Disable when running in a pipeline as the time to upload or download the massive .pch/.pchast to the cache is greater than the savings they provide. -->
|
|
<UsePrecompiledHeaders Condition="'$(TF_BUILD)' != ''">false</UsePrecompiledHeaders>
|
|
|
|
<!-- Change this to bust the cache -->
|
|
<MSBuildCacheCacheUniverse Condition="'$(MSBuildCacheCacheUniverse)' == ''">202408150737</MSBuildCacheCacheUniverse>
|
|
|
|
<!--
|
|
Visual Studio telemetry reads various ApplicationInsights.config files and other files after the project is finished, likely in a detached process.
|
|
This is acceptable and should not impact cache correctness.
|
|
-->
|
|
<MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
|
$(MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns);
|
|
\**\ApplicationInsights.config;
|
|
$(LocalAppData)\Microsoft\VSApplicationInsights\**;
|
|
$(LocalAppData)\Microsoft\Windows\INetCache\**;
|
|
A:\;
|
|
E:\;
|
|
$(windir)\**;
|
|
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
|
|
|
<!-- Unit tests of low-priv processes, eg the preview handler tests, may log to this location. -->
|
|
<MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
|
$(MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns);
|
|
$(USERPROFILE)\AppData\LocalLow\Microsoft\PowerToys\**;
|
|
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
|
|
|
<!--
|
|
This repo uses a common output directory with many projects writing duplicate outputs. Allow everything, but note this costs some performance in the form of requiring
|
|
the cache to use copies instead of hardlinks when pulling from cache.
|
|
-->
|
|
<MSBuildCacheIdenticalDuplicateOutputPatterns>$(MSBuildCacheIdenticalDuplicateOutputPatterns);**</MSBuildCacheIdenticalDuplicateOutputPatterns>
|
|
|
|
<!-- version of MSBuildCache is not part of the cache key -->
|
|
<PackagesConfigFile>$(MSBuildThisFileDirectory)packages.config</PackagesConfigFile>
|
|
<MSBuildCacheIgnoredInputPatterns>$(MSBuildCacheIgnoredInputPatterns);$(PackagesConfigFile)</MSBuildCacheIgnoredInputPatterns>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(MSBuildCacheEnabled)' == 'true' and '$(MSBuildCachePackageRoot)' == ''">
|
|
<PackagesConfigContents>$([System.IO.File]::ReadAllText("$(PackagesConfigFile)"))</PackagesConfigContents>
|
|
<MSBuildCachePackageVersion>$([System.Text.RegularExpressions.Regex]::Match($(PackagesConfigContents), 'Microsoft.MSBuildCache.*?version="(.*?)"').Groups[1].Value)</MSBuildCachePackageVersion>
|
|
<MSBuildCachePackageRoot>$(MSBuildThisFileDirectory)packages\$(MSBuildCachePackageName).$(MSBuildCachePackageVersion)</MSBuildCachePackageRoot>
|
|
<MSBuildCacheSharedCompilationPackageRoot>$(MSBuildThisFileDirectory)packages\Microsoft.MSBuildCache.SharedCompilation.$(MSBuildCachePackageVersion)</MSBuildCacheSharedCompilationPackageRoot>
|
|
</PropertyGroup>
|
|
|
|
<ImportGroup Condition="'$(MSBuildCacheEnabled)' == 'true'">
|
|
<Import Project="$(MSBuildCachePackageRoot)\build\$(MSBuildCachePackageName).props" />
|
|
<Import Project="$(MSBuildCacheSharedCompilationPackageRoot)\build\Microsoft.MSBuildCache.SharedCompilation.props" />
|
|
</ImportGroup>
|
|
</Project>
|