visualstudio.xunit
visualstudio.xunit copied to clipboard
DLLs not copied on linux with multi targets
Hi!
I have csproj with multi targets like this:
<PropertyGroup>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<TargetFramework Condition="'$(OS)' != 'Windows_NT'">net6.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>10.0</LangVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>
When project is building on linux dlls:
-
xunit.runner.reporters.netcoreapp10.dll -
xunit.runner.utility.netcoreapp10.dll -
xunit.runner.visualstudio.dotnetcore.testadapter.dllare not copied to output directory.
Screen from linux:

On windows it is ok:

There for tests do not start (dotnet test --no-build -f net6.0 --verbosity quiet --nologo --collect:"XPlat Code Coverage" xUnitMultiTargetIssue/xUnitMultiTargetIssue.csproj):

--no-build is usted for pipeline reason.
After removing <TargetFrameworks>net472;net6.0</TargetFrameworks> dlls are copied corectly.
Sample repository with issue: https://github.com/Karql/xUnitMultiTargetIssue
Best regards, Mateusz