NUnit broke builds under various versions of mono


The following commit (97c870bf6589) broke builds under various versions of mono. I think that adding NUnit is causing that since there are issues with NUnit versions. This is an example of an error that gets generated during building Boogie using mono:
ProgramLoader.cs(11,11): error CS0117: NUnit.Framework.Assert' does not contain a definition forIsNotNullOrEmpty'

I am not sure what would be the most appropriate way to fix this, but it would be great to have Boogie compiling again under mono.
Closed Jan 29, 2015 at 8:51 PM by danliew
Nothing was broken, just the documentation was a little lacking


danliew wrote Jan 29, 2015 at 2:36 AM

Boogie does compile fine under mono. The problem is you're using the ancient version of NUnit that ships with mono. You need to install a newer version (currently 2.6.3) and we get that using NuGet package manager.

If you're using monodevelop then you can use the "Nuget Package Management add-in" to restore the missing packages. Just click "Project > Restore Packages". This will download the latest version of NUnit and will allow you to build Boogie and run it's unit tests.

If you're doing everything on the command line you can do this
$ wget https://nuget.org/nuget.exe
$ mono ./nuget.exe restore Boogie.sln
This is also documented at http://boogie.codeplex.com/wikipage?title=SourcesMono&referringTitle=Home

The instructions certainly could be better. In the future I intend to start writing proper documentation for the bits of Boogie I know and this is one of the areas I intend to write about first.

Hope that helps.

zrakamar wrote Jan 29, 2015 at 3:23 AM

I am doing everything from command line. So here is what I get:
smack@linux-mac3:~/smack-project/boogie/Source> mono ./nuget.exe restore Boogie.sln 
WARNING: Error: SendFailure (Error writing headers)
Unable to find version '2.6.3' of package 'NUnit.Runners'.
mono version is 3.8.0

Any ideas?

danliew wrote Jan 29, 2015 at 7:17 AM

You'll see this
WARNING: Error: SendFailure (Error writing headers)
if you've not initialised the root SSL certificates for mono on your machine. Running the following should fix that
$ mozroots --import --sync

zrakamar wrote Jan 29, 2015 at 3:57 PM

This helped. Thanks a lot Dan!

danliew wrote Jan 29, 2015 at 8:50 PM

No problem.

For anyone looking at this in the future they should read