Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
Fix tests locally and in CI
Browse files Browse the repository at this point in the history
When tests run locally from within VS, we use net472 so that TestDriven can run them quickly. In CI, we use net5, which requires Microsoft.TestPlatform.ObjectModel (see microsoft/vstest#2469 (comment))
  • Loading branch information
kzu committed Oct 3, 2020
1 parent e71405f commit 5717b45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<PackageVersion Include="TypeNameFormatter.Sources" Version="1.0.1" />

<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageVersion Include="Microsoft.TestPlatform.ObjectModel" Version="16.7.1" />
<PackageVersion Include="Moq" Version="4.14.5" />
<PackageVersion Include="xunit" Version="2.4.1" />
<PackageVersion Include="xunit.runner.console" Version="2.4.1" />
Expand Down
6 changes: 4 additions & 2 deletions src/Stunts.UnitTests/Stunts.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<TargetFramework Condition="'$(BuildingInsideVisualStudio)' == 'true'">net472</TargetFramework>
<TargetFramework Condition="'$(BuildingInsideVisualStudio)' != 'true'">net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" />
<PackageReference Include="Moq" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.console" />
Expand Down

0 comments on commit 5717b45

Please sign in to comment.