kor_
kor_

Reputation: 1530

Running .NET MSBuild 3.5 tests on VS2010

We have a solution that targets .NET Framework 3.5 (that's because a COM interop interface doesn't supprt .NET 4). We're also using Visual Studio 2010 SP1. Now I'm trying to set up a testing environment for unit tests that should also be ran on TFS 2010.

I've done all the steps described in this issue's answer: Unit Testing .NET 3.5 projects using MStest in VS2010

But I still get the error

Method BusinessLogicBaseTest.MyClassInitialize has wrong signature. Parameter 1 should be of type Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.

I have changed the target framework to 3.5, modified the project file and copied the old (version 9) dlls from VS2008. I've also tried creating the test project within VS2008 and converting it to 2010 format, but the error still remains.

What am I missing here?

Upvotes: 0

Views: 728

Answers (2)

amadib
amadib

Reputation: 898

I was running into the issue myself and stubbornly wanted it to function as designed. I stumbled upon Sergei Dorogin's technical blog which walked me through the what I was going through and helped break down the issue.

The issue occur for a number of reasons so it's best to review your setup.

Upvotes: 1

kor_
kor_

Reputation: 1530

I resolved this by simply removing the MyClassInitialize method and the TextContext property. Now I'm using a basic constructor to initialize the values I need.

Upvotes: 1

Related Questions