Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dotnet new console -o myconsoleapp
- dotnet new xunit -o myconsoleapp.tests
- dotnet add ./myconsoleapp.tests reference ./myconsoleapp
- dotnet test ./myconsoleapp.tests
- dotnet build ./myconsoleapp.tests
- dotnet ./myconsoleapp.tests/bin/Debug/netcoreapp2.2/myconsoleapp.dll
- A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'myconsoleapp.tests/bin/Debug/netcoreapp2.2/'.
- Failed to run as a self-contained app. If this should be a framework-dependent app, add the myconsoleapp.tests/bin/Debugnetcoreapp2.2/myconsoleapp.runtimeconfig.json file specifying the appropriate framework.
- using(var sut = Process.Start(@"<path-to-the-executable>"))
- {
- sut.WaitForExit();
- var actual = sut.ExitCode;
- Assert.Equal(-1,actual);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement