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
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.
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.
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 .
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With