"Could not create service" exception when clicking Cover, Cover tests, or building with 'Cover after every build' turned on.
See original GitHub issueI’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:
- Created 6 years ago
- Comments:19 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, I think I will add some developer options, namely:
Hopefully this will help to understand the issue.
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