Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

updating nunit-console on command line

I am trying to upgrade my nunit-console version 2.4.8 to the latest or at least to version 3. The only help I found online was about Visual Studio and upgrading it there, but I am working on MAC and in my VS it has already the latest version.

I think the way I search for is about nuget on command line like

nuget update nunit-console

but it gives me following error

No packages.config, project or solution file specified. Use the -self switch to update NuGet.exe.

What is the right command or is there an other way I need to go?

Thanks in advance

like image 441
rm -rf Avatar asked Dec 18 '17 08:12

rm -rf


People also ask

How do I install NUnit console?

Downloading the Zip FileDownload the latest binary zip of the NUnit Framework from our Download page. Unzip the file into any convenient directory. You can also download the latest binary zip or an MSI installer of the NUnit Console from GitHub.

Where is NUnit console exe?

For NUnit 2, this directory is the local path to the file nunit-console.exe , such as C:\Program Files\NUnit 2.2\bin. For NUnit 3, this directory is the full path to the file nunit3-console.exe , such as C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe.

How do you use the NUnit runner?

The NUnit Runners allow you to run your tests from the command line (msbuild). You can also accomplish this by running your tests using the vstest. console.exe which can be found in the Visual Studio directory: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow .


1 Answers

You are trying to update nunit-console that ships with Mono? You cannot update that just by using nuget.

Instead I would just download the NUnit console runner you want to use from nuget and just call that using Mono. A simple way to get the console runner would be to run:

nuget install NUnit.ConsoleRunner

This would download the latest NUnit console runner and extract it to:

NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe

Then either use the above nunit3-console.exe runner directly with mono:

mono full/path/to/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe

Or if you want to have a nunit3-console command then I would look at the existing nunit-console script /Library/Frameworks/Mono.framework/Versions/Current/Commands/nunit-console

#!/bin/sh
exec /Library/Frameworks/Mono.framework/Versions/5.8.0/bin/mono --debug $MONO_OPTIONS /Library/Frameworks/Mono.framework/Versions/5.8.0/lib/mono/4.5/nunit-console.exe "$@"

Then create your own based on this script but have it use the new NUnit console runner you downloaded.

You may want to put this script somewhere else instead of /Library/Frameworks/Mono.framework/Versions/Current/Commands/ to avoid it being removed when Mono is updated.

like image 148
Matt Ward Avatar answered Oct 06 '22 00:10

Matt Ward