0

I am getting below error in my TFS build however all test are executed successfully. I am bit confused as to why this error is occurring when all required dlls are already present in the project

Exception NUnit.Core.UnsupportedFrameworkException, Exception thrown executing tests in C:\NUnitPoC\UnitTest.dll

Dependent Assembly Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a of C:\Test_CI\bin\NUnitPoC\NUnit3.TestAdapter.dll not found. Can be ignored if not a NUnit project.

Library details-

NUnit.3.5.0

NUnit3TestAdapter.3.6.0

Naresh
  • 11
  • 1
  • Do you use xaml build or vNext build? In which step do you get this error? Share your detailed settings of build definition. – Cece Dong - MSFT Dec 23 '16 at 07:05
  • Can you share the detailed build logs? – Eddie Chen - MSFT Dec 26 '16 at 02:12
  • @Cece-MSFT I am using XAML for TFS build configuration – Naresh Jan 02 '17 at 06:57
  • @Eddie-MSFT - build log can be found at - https://drive.google.com/open?id=0BwytUbWrQERESmMyS2VUTjRlalE. What is interesting is that test cases are successful but TFS build reports error - https://drive.google.com/open?id=0BwytUbWrQEREbnZxVDhaYmFNYjg – Naresh Jan 02 '17 at 09:39
  • @Naresh What's your project type? Asp.Net Web Application or Asp.Net Core Web Application? And I cannot find the error message from the build log. – Eddie Chen - MSFT Jan 03 '17 at 06:39
  • @Eddie-MSFT Solution contains just a single class library and Test project – Naresh Jan 04 '17 at 07:20
  • @Naresh Can you check if you have NUnit2.0 version installed? A similar question here: http://stackoverflow.com/questions/35191374/nunit-tests-throwing-exception-only-when-run-as-part-of-tfs-msbuild-process – Eddie Chen - MSFT Jan 04 '17 at 07:39

1 Answers1

0
  1. Check whether you have other versions of Nunit TestAdapter, if have, try to disable them.

  2. If you use vNext build, check whether you have specified Path to Custom Test Adapters in VS Test step:

enter image description here

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
  • It's a sample project which doesn't have any other version of Nunit test adapters. I also followed all ways to mentioned in link https://blogs.msdn.microsoft.com/aseemb/2012/03/03/how-to-make-your-extension-visible-to-the-test-explorer-in-visual-studio-11/ but still get same error. – Naresh Jan 02 '17 at 07:07