In CI server, I run tests in net4x for both windows and Linux and I want to enable/disable Appdomain
based on OS.
In net4x, Xunit tests can be build in both windows and Linux
Getting Started with xUnit.net Multi-targeting with non-Windows OSes
by adding the package
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
</ItemGroup>
dotnet test
can run Xunit tests in Linux when MONO is installed.
dotnet test --settings additionalargs.runsettings
The cli command dotnet test
use .runsettings to configure tests, but Xunit test configuration are not available.
Is there a way to enable then disable AppDomain in Windows/Linux respectively in dotnet test when running Xunit test project?
something like:
dotnet test --setting appDomain=denied??? # in linux,
dotnet test --setting appDomain=required??? # in windows