Skip to content
Permalink
Browse files

Make dotnet test execute only test projects (#86)

This change modifies the VSTest target to ensure
that the VSTest target gets executed for test projects
only.

The solution for the problem is based on:
https://dasmulli.blog/2018/01/20/make-dotnet-test-work-on-solution-files/
  • Loading branch information...
frederik-h authored and mjsabby committed Dec 5, 2018
1 parent ae1f568 commit 7f529a0852bf882b098bb6aef52cfaf2cc95a60c
Showing with 14 additions and 0 deletions.
  1. +9 −0 Directory.Build.targets
  2. +5 −0 after.LLVMSharp.sln.targets
@@ -0,0 +1,9 @@
<Project>
<Target Name="VSTestIfTestProject">
<!-- Change VSTest to call only projects where IsTestProject is defined.
This gets defined in Microsoft.NET.Test.Sdk and hence
VSTest is run only on test projects. -->
<CallTarget Targets="VSTest" Condition="'$(IsTestProject)' == 'true'" />
</Target>
</Project>

@@ -0,0 +1,5 @@
<Project>
<Target Name="VSTest">
<MSBuild Projects="@(ProjectReference)" Targets="VSTestIfTestProject" />
</Target>
</Project>

0 comments on commit 7f529a0

Please sign in to comment.
You can’t perform that action at this time.