Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'NUnit.Framework.IgnoreAttribute' does not contain a constructor that takes 0 arguments #44

Closed
NobbZ opened this issue Dec 20, 2015 · 9 comments

Comments

@NobbZ
Copy link
Member

NobbZ commented Dec 20, 2015

Hi there!

When trying to do the leap-exercise, I am confronted with the following error:

'NUnit.Framework.IgnoreAttribute' does not contain a constructor that takes 0 arguments

It is repeating in lines 12, 19, and 26 of LeapTes.cs.

I am using MSVS 2013 CE

and have the following packages.config:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="NUnit.Console" version="3.0.1" />
  <package id="NUnit.Runners" version="3.0.1" />
</packages>

Since the NUnit.Runners now does show as "NUnit Console Version 3" when searching I do think it is a versioning issue with NUnit. Could you please provide a proper Version selector in the documentation or update the track to NUnit 3?

@NobbZ
Copy link
Member Author

NobbZ commented Dec 20, 2015

I downgraded to 2.6.4, now it seems to work.

@kytrinyx
Copy link
Member

/cc @jwood803 (in case you know this stuff)

@jwood803
Copy link
Contributor

Looks like the version 3 of NUnit had some breaking changes. Since this is the case, I'll get to updating the tests. Folks shouldn't have to specify what version of NUnit to use.

@bressain
Copy link
Contributor

Heh, beat me to it. Yeah, looks like a comment is required for Ignore attributes for nUnit 3.

@ErikSchierboom
Copy link
Member

@bressain @jwood803 I am looking into this, but it is a bit hard to support both NUnit 3 and NUnit 2. This is because the Ignore propertiy of the TestCase attribute has changed type, from bool to string. Furthermore, the Result property in that class has been renamed to ExpectedResult, also a breaking change.

I have a branch that makes the tests compatible with NUnit 3, but is that what we want? Perhaps any has a clever solution to how to support both?

@jwood803
Copy link
Contributor

jwood803 commented Feb 5, 2016

I think we can just switch to support NUnit 3. It may be a bit of a weird transition to folks who are used to it being in NUnit 2 and, when they pull down the next exercise, have to upgrade to NUnit 3. Maybe we can just add this to the setup doc?

@ErikSchierboom
Copy link
Member

I've created a PR that updates the tests to use NUnit 3: #50

@jwood803
Copy link
Contributor

jwood803 commented Feb 5, 2016

You're quick @ErikSchierboom! And you even updated the docs! I'll merge this after meetings.

@ErikSchierboom
Copy link
Member

@jwood803 😎 Once this is merged, could you look at #49? Once that is merged, I think I can get a FAKE build script similar to the F# version working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants