26
votes

After update the test project NuGet i got this error:

The type 'TestClassAttribute' exists in both 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

Which one i should keep?

1
TestClassAttribute exists in both in order to allow for backward compatibility when switching to the newer framework.Nkosi

1 Answers

40
votes

I drop the Microsoft.VisualStudio.QualityTools.UnitTestFramework from the unit test project references and it worked. It successfully compile and run my tests.

I couldn't find any documentation that supports this fix.