ademanuele / VSMac-CodeCoverage

A Visual Studio for Mac code coverage extension.
MIT License
75 stars 16 forks source link

VisualStudio Mac 2022 install #21

Open dgonzalezp opened 2 years ago

dgonzalezp commented 2 years ago

Hi! Thanks for this great extension!

Is there a way to install it to VisualStudio 2022 for Mac? I know its still in preview, but I see extensions are already there. But there's no option to add the custom url for the reposiroty. Is there a way to add it manually?

Thanks in advance.

justinwojo commented 2 years ago

I was able to install it into VS22 for Mac by directly downloading the mpack file from here: https://github.com/ademanuele/VSMac-Extensions/tree/master/VSMac-CodeCoverage

Unfortunately it won't let me enable the extension though. It shows as installed but it's automatically disabled with no way to enable. Guessing there's a breaking change that'll require a code change.

raviraj87 commented 2 years ago

Facing the same issue on Visual Studio 2022 Mac. Extension says disabled all the time:

image

Please fix this awesome extension.

ademanuele commented 2 years ago

Hey guys. Been kinda busy lately. Will see if I have some time this week to have a look at this.

ganeshmeghale commented 2 years ago

@ademanuele this tool is more than awesome for us in improving the code covering and quality. Will really appreciate if this gets support to VS22.

Cheers.!

peterfaria-lula commented 2 years ago

I found this post on installing extensions manually with builtin tools: https://developercommunity.visualstudio.com/t/extension-support-for-visual-studio-2022-for-mac/1554393 The attempt shows that some MonoDevelop libs need to be updated.

> /Applications/Visual\ Studio.app/Contents/MacOS/vstool setup install ~/Downloads/CodeCoverage-v2.0.1.mpack
2022-06-20 11:35:48.603 vstool[19794:3303062] Xamarin.Mac: Invalid IDE Port: -1
Visual Studio Extension Setup Utility
Installing Code Coverage v2.0.1
WARNING: The add-in 'CodeCoverage.Code Coverage,2.0.1' could not be updated because some of its dependencies are missing or not compatible:
  required: MonoDevelop.UnitTesting,8.9.10, found: MonoDevelop.UnitTesting,17.0.3
  required: MonoDevelop.Core,8.9.10, found: MonoDevelop.Core,17.0.3
  required: MonoDevelop.Ide,8.9.10, found: MonoDevelop.Ide,17.0.3
carlos8k commented 2 years ago

Hello guys! Any workaround to install this extension in Vs22 for mac?

alexsorokoletov commented 1 year ago

Wondering if someone wants to try a preview build (forked this repo and played a bit with it)

CodeCoverage.Code Coverage_2.0.1.mpack.zip

carlos8k commented 1 year ago

@alexsorokoletov I installed the new preview build, and now the extension state show as "installed" as expected.

But when I click the "Gather Coverage" button, the unit tests run (and pass), but the coverage tool not works.

Captura de Tela 2022-10-25 às 10 47 11

Maybe I need to set up something to the things working, I'll work on it later, and bring feedback here.

alexsorokoletov commented 1 year ago

@carlos8k thank you for checking this! I guess I need a test "test" project!

raviraj87 commented 1 year ago

Wondering if someone wants to try a preview build (forked this repo and played a bit with it)

CodeCoverage.Code Coverage_2.0.1.mpack.zip

Same results as well. "Running unit tests..." remains active forever. But huge thanks for making this work. Please fix rest of the feature.

alexsorokoletov commented 1 year ago

@carlos8k @raviraj87 how about this build? CodeCoverage.Code Coverage.3.0.1.mpack.zip

Here's what I can see running this one:

demo of code coverage vs2022
raviraj87 commented 1 year ago

@carlos8k @raviraj87 how about this build? CodeCoverage.Code Coverage.3.0.1.mpack.zip

Here's what I can see running this one:

demo of code coverage vs2022

Yes, working like a charm. Thanks for the update

carlos8k commented 1 year ago

@alexsorokoletov now works for me too, but only for small projects. I tried to open a large project (about 1k unit tests, 26k lines of coverage code), and my Visual Studio freezes for a long time every time I interact with coverage plugin.

Sometimes the Visual Studio stopped working, and I had to force quit. I'll need to uninstall the plugin to work. :(

But, thanks for the update, and congratulations for the work!

alexsorokoletov commented 1 year ago

@carlos8k great, thank you for checking! Wondering if I can find a sample project with that many codes (was that an open source project by any chance?) and see what's slowing it (Could be an exception or maybe a slow JSON).

Am I correct to guess that the combination "VS 2019 + this extension" was not as slow?

alexsorokoletov commented 1 year ago

turns out the preferences window doesn't work yet, bc .net 6 and Gtk doesn't quite marry. Wondering if I can port this to a different target instead.

Still looking for a good size unit test repo, if anyone has pointers.

benjaminhallock commented 1 year ago

Bump... got it installed would still like a workaround for my testing class

alexsorokoletov commented 1 year ago

@benjaminhallock which release did you install? Wondering if this one worked for you or not https://github.com/alexsorokoletov/VSMac-CodeCoverage/releases/tag/v3.0.1-2022

(Probably that's what you tried but let me double check)

jawbrey commented 1 year ago

@alexsorokoletov we had your fork working but it seems to have broken with the latest VS2022 Mac updates. It shows disabled with no option to enable it

alexsorokoletov commented 1 year ago

@jawbrey Hi! It probably needs updating to include latest VS2022 Mac libraries. Might be also related to Intel vs Apple Silicon, though I am not sure about that.

I'm not actively working with VS for Mac these days so I won't be looking into this OSS code any time soon. Probably needs some active maintainer or become a commercial (not for me to decide this) to have some traction.

Maybe commit history in my fork will be of any help + make sure to create a good Unit Test project and include that as a sample test project. It looks like these test projects differ from one to another.

I wish I had a better answer!