Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<Project>
<Project InitialTargets="NETStandardCompatError_MSTest_TestAdapter">

<Target Name="NETStandardCompatError_MSTest_TestAdapter"
Condition="'$(SuppressTfmSupportBuildWarnings)' == ''">
<Warning Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'"
Text="MSTest.TestAdapter does not support the target framework '$(TargetFramework)' and has not been tested with it. Test libraries (projects that don't directly run tests) should not reference MSTest.TestAdapter or the MSTest metapackage. Instead, reference only MSTest.TestFramework. To suppress this warning and proceed at your own risk, add &lt;SuppressTfmSupportBuildWarnings&gt;true&lt;/SuppressTfmSupportBuildWarnings&gt; to your project file." />
</Target>

<!-- Handle the coexistence between testing platform and Microsoft.NET.Test.Sdk -->
<PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Package/MSTest.Sdk/Sdk/Sdk.props.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />

<PropertyGroup>
<!-- If the project targets .NET Standard, it's not supposed to be a test application. So, we default to false. -->
<IsTestApplication Condition=" '$(IsTestApplication)' == '' AND '$(TargetFrameworkIdentifier)' == '.NETStandard' ">false</IsTestApplication>
<IsTestApplication Condition=" '$(IsTestApplication)' == '' ">true</IsTestApplication>
</PropertyGroup>

Expand Down
Loading