locked
Errors running tests RRS feed

  • Question

  • Everytime I try to run my unit tests I consistently keep getting these errors. I am using NUnit and I have it and the adapter installed.

    Test run will use DLL(s) built for framework .NETFramework,Version=v4.5 and platform X64. Following DLL(s) do not match framework/platform settings.
    code_challenge.exe is built for Framework 4.7 and Platform X64.
    Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.

    [14/06/2019 18:23:15 Warning] No test is available in C:\Users\azabo\Documents\CSharp_code_challenge\CSharp_code_challenge\code_challenge\bin\x64\Debug\code_challenge.exe. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
    [14/06/2019 18:23:16 Informational] ========== Run test finished: 0 run (0:00:04.8107028) ==========

    Friday, June 14, 2019 5:32 PM

All replies

  • Hi joseph,

    Sorry for delay in reply.

    According to this error, the framework of code_challenge.exe is not compatible with test project. As far as I know,  Nunit usually works on .Net core. The .Net framework is different from .Net Core, the .Net framework just works for windows desktop application, .Net core is for cross platform. But the .NET Core app is compatible with dlls which is from .NET framework 4.5 and above.

    Since the .exe app seems to be a windows desktop application, we suggest you could set the target framework of code_challenge.exe to .Net Core 2.1 or low, then rebuild your project and run tests.

    Any feedback will be expected.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com




    Monday, June 17, 2019 6:56 AM
  • Hi Joseph Azeez,

    Does your issue is solved or not? If not, could you please share the detail error message when you build the code?

    If you already found the solution, please share it in here or mark the helpful reply, that will help other community members, we can also close this thread for you, thanks for your understanding.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, June 19, 2019 11:26 AM
  • I've just recently began seeing this problem, with projects that didn't used to generate this error. In my case I'm seeing it with MsTest2 v1.4. I've been able to reproduce this issue with both .NET Fx (v4.7-4.8) and .net core v2.2. As a matter of fact, I just verified this behavior, using Microsoft's built-in MsTest Core Template. 

    [6/25/2019 4:02:58 PM Informational] ------ Run test started ------
    [6/25/2019 4:03:00 PM Warning] Test run will use DLL(s) built for framework .NETCoreApp,Version=v1.0 and platform X86. Following DLL(s) do not match framework/platform settings.
    UnitTestProject3.dll is built for Framework 2.2 and Platform AnyCPU.
    Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.

    [6/25/2019 4:03:02 PM Informational] ========== Run test finished: 1 run (0:00:03.3026218) ==========

    This is now out of the box behavior.

    Please advise.


    Brian Reisman


    • Edited by joltcoder Tuesday, June 25, 2019 9:10 PM
    Tuesday, June 25, 2019 9:05 PM