My scenario is that I do not want to depend on an environment's installed dotnet version. I would ideally want to have a standalone XUnit app using which I can run tests on the target environment.
.NET Core console applications have an OutputType
as Exe
and so after being published as standalone we could execute the published executable. This is understandable as the Console app has an entry point within the app. Where as in case of a XUnit test project we do not have an entry point.
Just adding <OutputType>Exe</OutputType>
to an XUnit test project did not help (understandably)