Adding a NUnit 2.6.1 Visual Studio 2012 Link

I am using Visual Studio 2012, and I downloaded NUnit 2.6.1 to run Unit Tests in code. I added a link to nunit.framework in the draft solution, where I need it.

The problem is that for some reason, when I try to include a namespace, it does not work. It looks like this:

using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; using NUnit.Framework; //This is not working here namespace SomeNamespace { [TestFixture] //This is not recognized.. public class SomeClassTest { [Test] //Neither recognized.. public void SomeMethodTest() { //Ok some implementation goes here.. } } } 

Any ideas on why it is not working? Thanks in advance!

PS: I use ReSharper as an extension for VS2012 ... Could this be the source of the problem?

EDIT: I tried to install it several times using NUGet, but I get the same error when NUGet completes the installation:

 Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)) Successfully uninstalled 'NUnit 2.6.1'. Install failed. Rolling back... Failed to add reference to 'nunit.framework'. 

Does it roll back? I read, and people said something about the GAC and added links manually. I know little about this, but it may be useful to answer the question.

+4
source share
2 answers

I have the same problem 3-4 times when I installed it from NUGet. I decided to remove it and reinstall it from NUGet.

+5
source

Add the NUnit link through NUGet .

The link contains a guide for VS2010, but in VS2012 it is almost the same.

+3
source

Source: https://habr.com/ru/post/1440223/


All Articles