adamchester / expecto-adapter

Visual Studio test adapter for Expecto (https://github.com/haf/expecto)
MIT License
28 stars 16 forks source link

adapter does not work with dotnetcore sdk project files #38

Closed jackfoxy closed 6 years ago

jackfoxy commented 6 years ago
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net47</TargetFramework>

test with my test branch

[1/22/2018 3:36:26 PM Informational] Running all tests (9999.0.0.0)
[1/22/2018 3:36:26 PM Informational] Creating test host for E:\GitRepos\PersonalServer\tests\PersonalServer.Tests\bin\Debug\net47\PersonalServer.Tests.exe
[1/22/2018 3:36:26 PM Informational] Executing tests in assembly E:\GitRepos\PersonalServer\tests\PersonalServer.Tests\bin\Debug\net47\PersonalServer.Tests.exe
[1/22/2018 3:36:26 PM Error] System.MissingMethodException: Method not found: 'Void ExpectoConfig..ctor(Boolean, Int32, Microsoft.FSharp.Core.FSharpOption`1<System.TimeSpan>, System.TimeSpan, Double, Boolean, Microsoft.FSharp.Core.FSharpFunc`2<Expecto.Test,Expecto.Test>, TestPrinters, Expecto.Logging.LogLevel, Microsoft.FSharp.Core.FSharpFunc`2<Expecto.TestCode,Expecto.SourceLocation>, Int32, Int32, Microsoft.FSharp.Core.FSharpOption`1<Int32>, Boolean)'.
   at Execution.ExecuteProxy.ExecuteTests()
   at Execution.ExecuteProxy.ExecuteTests()
   at <StartupCode$Expecto-VisualStudio-TestAdapter>.$Execution.clo@180-10.Invoke(Unit unitVar)
   at Microsoft.FSharp.Control.AsyncBuilderImpl.callA@841.Invoke(AsyncParams`1 args)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.FSharp.Control.AsyncBuilderImpl.commit[a](AsyncImplResult`1 res)
   at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronouslyInCurrentThread[a](CancellationToken token, FSharpAsync`1 computation)
   at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronously[a](CancellationToken token, FSharpAsync`1 computation, FSharpOption`1 timeout)
   at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken)
   at Execution.ExpectoTestExecutor.runAllExecutors()
   at Execution.ExpectoTestExecutor.Microsoft-VisualStudio-TestPlatform-ObjectModel-Adapter-ITestExecutor-RunTests(IEnumerable`1 sources, IRunContext runContext, IFrameworkHandle frameworkHandle)
[1/22/2018 3:36:26 PM Warning] No test is available in E:\GitRepos\PersonalServer\tests\PersonalServer.Tests\bin\Debug\net47\PersonalServer.Tests.exe. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
MNie commented 6 years ago

Related to #211

MNie commented 6 years ago

@jackfoxy could you check if Expecto.VisualStudio.TestAdapter references Expecto in version > 5.1.1? If my project references only a Expecto.VisualStudio.TestAdapter it references an Expecto in version 5.0: image But if I install explicitly the newest Expecto everything seems to work fine. image

MNie commented 6 years ago

@jackfoxy I released a 6.0.1 with restriction for Expecto version. Please check if it works for you :)

jackfoxy commented 6 years ago

Thanks for the quick response. Just picked up 6.0.1 and 155 of 156 tests passed, as expected. @MNie

MNie commented 6 years ago

@jackfoxy great to hear :)