VSMac-CodeCoverage icon indicating copy to clipboard operation
VSMac-CodeCoverage copied to clipboard

VisualStudio Mac 2022 install

Open dgonzalezp opened this issue 2 years ago • 19 comments

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.

dgonzalezp avatar May 10 '22 14:05 dgonzalezp

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.

justinwojo avatar May 11 '22 22:05 justinwojo

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

image

Please fix this awesome extension.

raviraj87 avatar May 30 '22 05:05 raviraj87

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

ademanuele avatar May 30 '22 07:05 ademanuele

@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.!

ganeshmeghale avatar Jun 07 '22 07:06 ganeshmeghale

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

peterfaria-lula avatar Jun 20 '22 15:06 peterfaria-lula

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

carlos8k avatar Jun 28 '22 15:06 carlos8k

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

alexsorokoletov avatar Oct 25 '22 07:10 alexsorokoletov

@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.

carlos8k avatar Oct 25 '22 13:10 carlos8k

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

alexsorokoletov avatar Oct 26 '22 00:10 alexsorokoletov

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.

raviraj87 avatar Oct 26 '22 05:10 raviraj87

@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

alexsorokoletov avatar Nov 01 '22 06:11 alexsorokoletov

@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

raviraj87 avatar Nov 01 '22 08:11 raviraj87

@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!

carlos8k avatar Nov 01 '22 12:11 carlos8k

@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 avatar Nov 01 '22 15:11 alexsorokoletov

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.

alexsorokoletov avatar Nov 03 '22 04:11 alexsorokoletov

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

benjaminhallock avatar Jan 26 '23 21:01 benjaminhallock

@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)

alexsorokoletov avatar Jan 30 '23 04:01 alexsorokoletov

@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

jawbrey avatar Jun 22 '23 16:06 jawbrey

@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!

alexsorokoletov avatar Jun 23 '23 15:06 alexsorokoletov