question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Could not create service" exception when clicking Cover, Cover tests, or building with 'Cover after every build' turned on.

See original GitHub issue

I’m getting an error in the AxoCover Output window pane when I click the Cover option in the header bar, the Cover tests option in the context menu, or build with “Cover after every build” turned on (via the Context menu).

Please let me know what additional information you would like. AxoCover is a great tool and I’m glad to have found it!

Here’s the contents of the Output window pane:

Test execution started.
AxoCover encountered an error:

Test execution failed.
SerializableException: Could not create service.
   at AxoCover.Models.TestProcess`1..ctor(IProcessInfo processInfo) in C:\projects\axotools\AxoCover\Models\TestProcess.cs:line 36
   at AxoCover.Models.ExecutionProcess.Create(String[] testPlatformAssemblies, IHostProcessInfo hostProcess, TestPlatform testPlatform) in C:\projects\axotools\AxoCover\Models\ExecutionProcess.cs:line 28
   at AxoCover.Models.AxoTestRunner.RunTests(TestItem testItem, Boolean isCovering, Boolean isDebugging) in C:\projects\axotools\AxoCover\Models\AxoTestRunner.cs:line 176
   at AxoCover.Models.TestRunner.<>c__DisplayClass31_0.<RunTestsAsync>b__0() in C:\projects\axotools\AxoCover\Models\TestRunner.cs:line 53

The Build version is 1.1.244 per the Settings window. The last check for updates was today.

Microsoft Visual Studio Professional 2017 Version 15.2 (26430.16) Release VisualStudio.15.Release/15.2.0+26430.16 Microsoft .NET Framework Version 4.6.01590

Installed Version: Professional

I have telemetry turned ON for AxoCover.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
axodoxcommented, Oct 10, 2017

Ok, I think I will add some developer options, namely:

  • Configure all timeouts used
  • Print all exceptions to console including handled ones
  • Some solution to print the current stack trace of the runner threads on timeout (so we can see what we spend the time on)

Hopefully this will help to understand the issue.

0reactions
auroraeosrosecommented, Apr 5, 2019

This bug is definitely related to whitespace and quotation marks in settings entries

https://github.com/axodox/AxoCover/blob/master/AxoCover/Models/Testing/Execution/OpenCoverProcessInfo.cs#L84

This appears to be causing issues when sending args to opencover console.exe

https://github.com/opencover/opencover/wiki/Usage

I haven’t dug around in the code enough to figure out exactly where the issue is - but any kind of quotes in the exclude values will cause the serializableexception to fail

But not using quotes means you can’t ignore anything with spaces apparently

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not create service of type ScriptPluginFactory using ...
In my case I just opened up Android Studio and opened the project's folder, then Android Studio updated all the Gradle dependencies ...
Read more >
"Could not create service" exception when clicking Cover, ...
"Could not create service" exception when clicking Cover, Cover tests, or building with 'Cover after every build' turned on.
Read more >
Starting tests from a code file (e.g., using Ctrl+R, T) tries to ...
When I try to start tests from inside a cs file I get two error dialogs about package load failures related to LiveShare...
Read more >
Troubleshooting AWS CodeBuild
Issue: When you try to run a build project, the build fails with this error. Possible cause: Your source repository has a self-signed...
Read more >
How to Troubleshoot Create Cluster Failures
In this blog, I will outline the steps in order to troubleshoot “Create Cluster” failures with Windows Server 2012 or later Failover Clustering....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found