visualstudio.xunit icon indicating copy to clipboard operation
visualstudio.xunit copied to clipboard

DLLs not copied on linux with multi targets

Open Karql opened this issue 3 years ago • 0 comments

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.dll are not copied to output directory.

Screen from linux: screen-build-linux

On windows it is ok: screen-build-win

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

--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

Karql avatar Aug 17 '22 08:08 Karql