Skip to content

Commit f5e5149

Browse files
committed
Fix dotnet test UnitsNet.sln
Workaround that prevents trying to run tests for non-test projects.
1 parent 0e91711 commit f5e5149

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Directory.Build.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project>
2+
<!-- Workaround for `dotnet test UnitsNet.sln`: https://dasmulli.blog/2018/01/20/make-dotnet-test-work-on-solution-files/ -->
3+
<Target Name="VSTestIfTestProject">
4+
<CallTarget Targets="VSTest" Condition="'$(IsTestProject)' == 'true'" />
5+
</Target>
6+
</Project>

after.UnitsNet.sln.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project>
2+
<!-- Workaround for `dotnet test UnitsNet.sln`: https://dasmulli.blog/2018/01/20/make-dotnet-test-work-on-solution-files/ -->
3+
<Target Name="VSTest">
4+
<MSBuild Projects="@(ProjectReference)" Targets="VSTestIfTestProject" />
5+
</Target>
6+
</Project>

0 commit comments

Comments
 (0)