SQLProvider icon indicating copy to clipboard operation
SQLProvider copied to clipboard

RunTests target fails when no .NET 3.5 installed

Open jlogar opened this issue 7 years ago • 2 comments

Description

Running build.cmd (as per build instructions) fails on Windows with no .NET 3.5 framework installed.

Expected behavior

All green build.

Actual behavior

Starting Target: RunTests (==> Build)
C:\_tlaka\oss\SQLProvider\packages\NUnit.Runners\tools\nunit-console.exe "-nologo" "-noshadow" "-labels" "C:\_tlaka\oss\SQLProvider\tests\SqlProvider.Tests\bin\Release\SqlProvider.Tests.dll" "-xml:TestResults.xml"
C:\_tlaka\oss\SQLProvider\packages\NUnit.Runners\tools\nunit-console.exe "-nologo" "-noshadow" "-labels" "C:\_tlaka\oss\SQLProvider\tests\SqlProvider.Tests\bin\Release\SqlProvider.Tests.dll" "-xml:TestResults.xml"
Running build failed.
Error:
NUnit test failed. Process finished with exit code FatalError (-2146232576).

Known workarounds

Just as with FSharp data, nunit needs to be told to use newer framework. see https://github.com/fsharp/FSharp.Data/issues/782

Just adding the following to the startup section of nunit-console.exe.config does the trick. <supportedRuntime version="v4.0.30319" />

Not really at home with .NET/FAKE build configuration... Is there a way to make this more approachable on new installs (vanilla win10...)? Another option is to mention this in the build docs of course.

jlogar avatar Sep 04 '17 18:09 jlogar

nunit-console.exe.config comes from a NuGet package NUnit.Runners. Our paket.dependencies file is hard-coding the version to 2.6.4, I don't know why. Maybe updating that would help?

Thorium avatar Sep 06 '17 09:09 Thorium

Updated to 3.0.0 with no success. No sure how to make it more auto-detect friendly. It seems to prefer .NET 2/3.5. I checked FSharp.Data. It uses a different mechanism - FAKE & FAKE.NUnit3.

jlogar avatar Sep 07 '17 19:09 jlogar