Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET Core MSTests fail because of "Illegal characters in path"

When I click Run All .NET Core tests (the MSTest version) they do not run. It fails saying in the bottom left corner "Unexpected error detected. Check the Tests Output Pane for details".

I checked the output and this is the error:

[4/8/2018 19:29:53 Informational] ------ Run test started ------ [4/8/2018 19:29:53 Error] System.ArgumentException: Illegal characters in path.

I created a blank project called "Thing.Tests". The path is

C:\Users\james\OneDrive\Documents\visual studio 2017\Projects\Thing.Tests\Thing.Tests\Thing.Tests.csproj

What the issue is??

like image 401
James Esh Avatar asked Apr 08 '18 23:04

James Esh


1 Answers

Check out your system PATH:

echo %PATH%

I ended up having an entry with double quotes (which Visual Studio didn't like very much). Once I deleted that entry it worked like a charm.

You can edit it through the Environment Variables

Control Panel > System > Advanced System Settings > Environment Variables
like image 136
Kyle Kurihara Avatar answered Oct 10 '22 21:10

Kyle Kurihara