Skip to content

Commit

Permalink
Prevent tests from importing "normal" NuGet props/targets (#80573)
Browse files Browse the repository at this point in the history
We import them manually from a shared location.

Usually this is not a problem because batch build (via the build script)
does its own restore thing, but it is a problem in case the project is
restored on its own, such as when it is built with "dotnet build".
  • Loading branch information
SingleAccretion authored Feb 27, 2023
1 parent 0c8bef5 commit eccbe90
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@
<BuildAsStandalone Condition="'$(BuildAsStandalone)' == ''">true</BuildAsStandalone>
<OutputType Condition="$(BuildAsStandalone)">Exe</OutputType>
<TestFramework>GeneratedRunner</TestFramework>

<!-- Prevent project-specific NuGet props/targets from clashing with the ones we manually import below. -->
<ImportProjectExtensionProps>false</ImportProjectExtensionProps>
<ImportProjectExtensionTargets>false</ImportProjectExtensionTargets>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)testing\tests.props" Condition="'$(IsTestsCommonProject)' != 'true'" />
Expand Down

0 comments on commit eccbe90

Please sign in to comment.