Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Microsoft.CodeCoverage require any SKU of Visual Studio? #4759

Closed
paulomorgado opened this issue Nov 22, 2023 · 10 comments
Closed

Does Microsoft.CodeCoverage require any SKU of Visual Studio? #4759

paulomorgado opened this issue Nov 22, 2023 · 10 comments

Comments

@paulomorgado
Copy link

Is any SKU of Visual Studio required to use Microsoft.CodeCoverage?

@nohwnd
Copy link
Member

nohwnd commented Nov 22, 2023

I don't think so, it is included in the TestPlatform nuget package as well. https://www.nuget.org/packages/Microsoft.TestPlatform/17.9.0-preview-23531-01

@paulomorgado
Copy link
Author

Thanks, @nohwnd.

How can I know for sure that a license is not required?

This is used like coverlet, right? Just add the NuGet package to the project.

@nohwnd
Copy link
Member

nohwnd commented Nov 22, 2023

The package is distributed via nuget, it's closed source, but free. You don't need to buy VisualStudio to use it.

@paulomorgado
Copy link
Author

This is used like coverlet, right? Just add the NuGet package to the project.

@nohwnd
Copy link
Member

nohwnd commented Nov 22, 2023

@jakubch1 do you have some getting started guide for Microsoft.CodeCoverage?

@Evangelink
Copy link
Member

This might be a good starting point: https://github.com/microsoft/codecoverage

@paulomorgado
Copy link
Author

That's where I started, @Evangelink.

But I found nothing related to licensing. Can you point me to a more specific doc?

I did find some usage docs at https://github.com/microsoft/codecoverage/tree/main/docs

@Evangelink
Copy link
Member

@jakubch1 is owning the tool and will provide the 100% safe answer but as far as I can see from the NuGet package license file https://www.nuget.org/packages/Microsoft.CodeCoverage/17.9.0-preview-23531-01/License it's a simple MIT so there should be no problem using it.

@jakubch1
Copy link
Member

@paulomorgado There is no problem using it. It is also dependency of https://www.nuget.org/packages/Microsoft.NET.Test.SDK so you don't need to reference directly in csproj.

@paulomorgado
Copy link
Author

Thanks @jakubch1.

So, I just need to remove coverlet and run dotnet test --collect "Code Coverage;Format=cobertura".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants