diff options
Diffstat (limited to 'src/Directory.csproj.targets')
-rw-r--r-- | src/Directory.csproj.targets | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/Directory.csproj.targets b/src/Directory.csproj.targets index 2c6abce3..ed041bb8 100644 --- a/src/Directory.csproj.targets +++ b/src/Directory.csproj.targets | |||
@@ -7,18 +7,36 @@ | |||
7 | <DefineConstants Condition=" '$(Configuration)'=='Debug' ">$(DefineConstants);DEBUG</DefineConstants> | 7 | <DefineConstants Condition=" '$(Configuration)'=='Debug' ">$(DefineConstants);DEBUG</DefineConstants> |
8 | </PropertyGroup> | 8 | </PropertyGroup> |
9 | 9 | ||
10 | <PropertyGroup Condition=" '$(IsWixTestProject)'=='true' "> | 10 | <PropertyGroup Condition=" '$(IsWixTestProject)'=='true' OR '$(IsWixMSTestProject)'=='true' "> |
11 | <RollForward>Major</RollForward> | 11 | <RollForward>Major</RollForward> |
12 | <IsPackable>false</IsPackable> | 12 | <IsPackable>false</IsPackable> |
13 | <SignOutput>false</SignOutput> | 13 | <SignOutput>false</SignOutput> |
14 | </PropertyGroup> | 14 | </PropertyGroup> |
15 | 15 | ||
16 | |||
17 | <PropertyGroup Condition=" '$(IsWixMSTestProject)' == 'true' "> | ||
18 | <!-- Force a .NET v6-compatible package. --> | ||
19 | <MicrosoftTestingExtensionsCodeCoverageVersion>17.11.5</MicrosoftTestingExtensionsCodeCoverageVersion> | ||
20 | <TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure> | ||
21 | </PropertyGroup> | ||
22 | |||
23 | <Target Name="RunWixTests" AfterTargets="Build" Condition=" '$(IsWixMSTestProject)' == 'true' AND '$(SuppressWixTests)' != 'true' "> | ||
24 | <Delete Files="$(TestResultsFolder)$(MSBuildProjectName).trx" /> | ||
25 | |||
26 | <Exec | ||
27 | Command="$(TargetPath.Replace('.dll', '.exe')) --results-directory $(TestResultsFolder) --report-trx --report-trx-filename $(MSBuildProjectName).trx --no-progress --settings $([MSBuild]::GetPathOfFileAbove('wix.runsettings'))" | ||
28 | UseCommandProcessor="false" | ||
29 | CustomErrorRegularExpression=" Test method .+ threw exception:" /> | ||
30 | </Target> | ||
31 | |||
32 | |||
16 | <ItemGroup Condition=" '$(IsWixTestProject)'=='true' "> | 33 | <ItemGroup Condition=" '$(IsWixTestProject)'=='true' "> |
17 | <PackageReference Include="Microsoft.NET.Test.Sdk" /> | 34 | <PackageReference Include="Microsoft.NET.Test.Sdk" /> |
18 | <PackageReference Include="xunit" /> | 35 | <PackageReference Include="xunit" /> |
19 | <PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" /> | 36 | <PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" /> |
20 | </ItemGroup> | 37 | </ItemGroup> |
21 | 38 | ||
39 | |||
22 | <ItemGroup Condition=" '$(IsWixTestProject)'!='true' "> | 40 | <ItemGroup Condition=" '$(IsWixTestProject)'!='true' "> |
23 | <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> | 41 | <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> |
24 | </ItemGroup> | 42 | </ItemGroup> |