NUnit 3 console paramter containing spaces is auto wrapped with double quotes

I am trying to run a build to test some C# code using the NUnit 3 console with parameters.

One of the parameters is a folder location which contains spaces. This is being auto-wrapped at some point with double quotes. This is causing a build error with the URL dropping at the first space.

Example parameter: "c:\project\tests\data folder\some test sub folder\subfolder"

Usage:

nunit3-console.exe "--params=TestCasesLocation="c:\project\tests\data folder\some test sub folder\subfolder""

(Notice the doubling up of quotes)

Application fails with error something like:

File not found exception: "c:\project\tests\data" not found.

It makes no difference if I include double quotes around the paramter manually or not, the runner always wraps the entire statement in double quotes.

As a work around I've had to replace all spaces with a character that I strip out in the code later to get it to work, nasty, nasty.

Any help would be great, thanks.

0

Please sign in to leave a comment.