Nuget package doesnt install OpenCover in .NET Core projects
Please provide the following information when submitting an issue.
Where appropriate replace the
[ ]with a[X]
My Framework
- [ ] .NET 2
- [ ] .NET 3.5
- [ ] .NET 4
- [ ] .NET 4.5
- [ ] .NET 4.6
- [ ] .NET 4.6.1
- [ ] .NET 4.6.2
- [ ] .NET 4.7
- [ ] .NET 4.7.1
- [ ] .NET 4.7.2
- [ ] .NET Core 1.0.0
- [ ] .NET Core 2.0.0
- [X] Something else (.NET Core 3.0 preview 7)
My Environment
- [ ] Windows 7 or below (not truly supported due to EOL)
- [ ] Windows 8
- [ ] Windows 8.1
- [X] Windows 10
- [ ] Windows 10 IoT Core
- [ ] Windows Server 2012
- [ ] Windows Server 2012 R2
- [ ] Windows Server 2016
I have already...
- [X] repeated the problem using the latest stable release of OpenCover.
- [X] reviewed the usage guide and usage document.
- [ ] have looked at the opencover output xml file in an attempt to resolve the issue.
- [X] reviewed the current issues to check that the issue isn't already known. Someone did create an issue for this. Someone commented something that doesn't actually work. Then that same person that created the issue closed it, not because it was fixed but because they found a work around. It still doesn't work.
My issue is related to (check only those which apply):
- [ ] no coverage being recorded
- [ ] 32 or 64 bit support
- [ ] feature request
Expected Behavior
I expect OpenCover to be installed somewhere so I can use it
Actual Behavior
OpenCover is not installed.... so I can't use it.
Steps to reproduce the problem:
- Create a new .net core test project
dotnet new xunit - Add OpenCover to the new project
dotnet add package OpenCover - Restore nugets
dotnet restore - ??? OpenCover doesn't exist in any usable form.
- [X] reviewed the usage guide and usage document again because we know you probably didn't do it the first time.
- [ ] sample code or link to repository/gist is available (support is much faster this way) - Using all default settings and default generated code. Honestly, it's faster to not link to sample code that one must then download. Just run 2 commands to replicate (the
dotnet restoreisn't even necessary as dotnet automatically restores after adding the package - I just added to be extra sure that it has been restored)
Am I just missing something? I feel like if there is an OpenCover NuGet package I should be able to add the package to my project, and then use it.
I'll investigate but what are you expecting?
OpenCover is a utility and so isn't normally installed into tests projects since it has no assemblies you link with. Has it downloaded but not were you are expecting? I normally install it as a solutions package rather than at the project level. Some people find using the chocolaty version is cleaner for installing utilities like OpenCover