asbin
(Alexis Saettler)
October 22, 2021, 12:29pm
1
We have projects with an Item Group like:
<ItemGroup>
<ProjectCapability Remove="TestContainer" />
</ItemGroup>
Unfortunately this code will lead to detect the project as a Test project.
I understand that using this syntax will detect the project as a Test project:
<ProjectCapability Include="TestContainer" />
However in our case, we used the Remove="TestContainer"
syntax. Is it normal it is considered as a Test project as well?
duncanp
(Duncan Pocklington)
November 11, 2021, 3:14pm
3
Hi @asbin - apologies for the delayed response.
I’ve just tried analysing the project file with v5.3.1 of the scanner, and it correctly identified the project as non-test code:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectCapability Include="TestContainer" />
<ProjectCapability Remove="TestContainer" />
</ItemGroup>
</Project>
There are other reasons why the project could be categorised as a test project, and it will be logged in the normal
verbosity build output. See this wiki page for more information.
system
(system)
Closed
November 18, 2021, 3:14pm
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.