Enable target framework attribute on test assemblies (#39806)
authorViktor Hofer <viktor.hofer@microsoft.com>
Fri, 26 Jul 2019 14:17:48 +0000 (16:17 +0200)
committerViktor Hofer <viktor.hofer@microsoft.com>
Tue, 3 Sep 2019 15:40:00 +0000 (17:40 +0200)
Directory.Build.props

index 5e9fdb6..9f8d8b5 100644 (file)
     <NoStdLib>true</NoStdLib>
     <NoExplicitReferenceToStdLib>true</NoExplicitReferenceToStdLib>
     <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
-    <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
+    <!-- Enable the target framework attribute on test assemblies as vstest relies on that property. -->
+    <GenerateTargetFrameworkAttribute Condition="'$(IsTestProject)' != 'true'">false</GenerateTargetFrameworkAttribute>
     <CopyNuGetImplementations>false</CopyNuGetImplementations>
     <!-- Don't reference implicit framework packages, all projects in this repo must be explicit -->
     <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>