OpenCppCoverage / OpenCppCoveragePlugin

Official Visual Studio Plugin for OpenCppCoverage
GNU General Public License v3.0
67 stars 28 forks source link

Plugin fails to execute on VS2017 Community Edition #21

Closed MattRyder closed 6 years ago

MattRyder commented 6 years ago

Steps to Reproduce

Expected Result

OpenCppCoverage is called, only to likely raise an error about needing to be configured in some way. Still, I expect OpenCppCoverage.exe to have a crack at doing its magic.

Actual Result

I receive this error [1] as a popup and within the Output window, and further execution is halted.

Further information

The requested redist files (both arch. x86/x86_64) fail to install with the message described in the screenshot [2]. I tracked this down to this line, which checks the Registry for MSVC 14.0 runtimes? These keys don't exist on my machine. I tried creating them to spoof it, and the check appears to be smarter than I. I, like any wise person, don't mess around with my registry much, for fear of not booting again.

I've also tried to rebuild from source with the check patched out, but I can't seem to get "Microsoft.VisualStudio.Threading" referenced for a successful build, again I believe this to be a runtime version mismatch. (v14.0 vs. v15.0 installed)

Incidentally, OpenCppCoverage itself does work. And quite frankly, I like it. VS2017 integration would rock my world though.

Screenshots

[1] Response from running "Run OpenCppCoverage"

opencpp_plugin

[2] Response from attempting to install "vc_redist.x64.exe" or "vc_redist.x86.exe"

installing_redist
OpenCppCoverage commented 6 years ago

Hello,

The current version of the plugin is compiled with Visual Studio 2015 that is why you need to install VS 2015 redistributable.

Do you have another version of VS 2015 redistributable already installed? If yes, what is the exact version? Are there more information in the log file (in image [2])?

OpenCppCoverage

MattRyder commented 6 years ago

Oof. Turns out this one is a configuration issue, partly.

I've had some time this evening to actually get oriented with this bug, and it appears I have VS2017 in such a state that the MS.VS.Threading dll could't be found. After fiddling around, I managed to get it referenced (I don't understand how exactly, but it involved installing the NuGet package, uninstalling, then referencing). I switched out the OpenCppCoverage binaries, and got a full VSIX built out of it.

I did assume the hosted extension was compiled for VS2015, given the messages for vs2015 redists. I removed the CheckVSRedistInstalled check from my build, and the extension works correctly.

I can now observe that I'm an owner of a very sparse test suite, within VS2017.

OpenCppCoverage commented 6 years ago

Hello,

The latest version (In master branch) does not need VS2015 redistributable and should compile without any issue.

OpenCppCoverage