How are MTP test projects discovered when dotnet test is run against a solution containing them?
#7740
Unanswered
Ian Kemp (IanKemp)
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When my org started containerising our code, we discovered our test projects weren't being discovered by
dotnet test <solution>(where<solution>refers to a sln(x) containing at least one test project referencingMicrosoft.Net.Test.Sdk) when tests were executed in Docker builds. Subsequent investigation revealed this is because projects referencing that package, implicitly getIsTestProject=trueset via a .props file shipped with it - and in our Dockerfile's test run layer we'd omitted copying the NuGet packages, which meant that file didn't exist. (sad trombone noise)We're now considering a move to MTP. Given that it doesn't appear to require
Microsoft.Net.Test.Sdkso presumably doesn't care about the presence or absence ofIsTestProject, we'd thus like to understand howdotnet test <solution>discovers MTP projects - so that we can ensure our Dockerfiles don't do anything that would prevent this discovery from working as we expect.All reactions