ademanuele / VSMac-CodeCoverage

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

Update mono dependency or document required mono version #25

Open mayaracsferreira opened 10 months ago

mayaracsferreira commented 10 months ago

Thanks for this great extension!

As the official Visual Studio Test Coverage is still under review this extension has been saving lives!

I recently updated the MonoDevelop in my Mac and now I'm unable to get the VSMac-CodeCoverage running again When I attempted to reinstall the extension the message displayed says that it was expecting old versions of MonoDevelop.

It would be nice to write in the README or in the releases the expected version of Mono also :)

Captura de Tela 2023-08-21 às 17 05 12

(Image Description: Install Complete Extension installed successfully, with the following warnings: Warnings (1) The add-in 'CodeCoverage.Code Coverage, 1.0' could not be updated because some of dependencies are missing or not compatible: required: MonoDevelop.UnitTesting,8.5.4, found: Mono Develop.UnitTesting, 17.6.3 missing: MonoDevelop.TextEditor.Cocoa,8.5.4 required: MonoDevelop.Core, 8.5.4, found: MonoDevelop.Core, 17.6.3 required: MonoDevelop.lde, 8.5.4, found: MonoDevelop.lde,17.6.3)

rajgog commented 10 months ago

@mayaracsferreira - did you try installing the extension manually? If not can you install below version of code coverage.

https://github.com/alexsorokoletov/VSMac-CodeCoverage/releases/download/v3.0.1-2022/CodeCoverage.Code.Coverage.3.0.1.mpack

rajgog commented 10 months ago
image

seems - there is compatibility issues after latest update of vs mac

rajgog commented 10 months ago

@ademanuele , @dogukandemir - need help here. Please maintain this extension - It will save lot of Devs life.

flipper09112 commented 4 months ago

some solution?

ademanuele commented 4 months ago

Sorry guys, I’ve neglected this extension for a while now. I had created this a while ago when I was still working with Xamarin and I’ve since moved to a different stack and haven’t needed this.

I am glad people have found it useful and I am happy to hand this project over to anyone who would like to maintain it.

The problem specifically pointed out in this issue has to do with the version of the dependencies that the original extension was built with. From what I can tell, every new version of Visual Studio for Mac comes with a new version of these extensions and when the CodeCoverage extension tries to load itself, this fails. I suspect there’s a way to not depend on specific versions but I could not figure that part out.

Anyway, the general fix for this one is to basically recompile the extension using the latest version of Visual Studio. To do that, you just run: mdtool setup pack path/to/addin.xml

mdtool can be found inside the Visual Studio for Mac.app. I don’t remember the exact path, but I believe /Applications/Visual\ Studio\ for\ Mac.app/Contents/MacOS/mdtool.

And the addin.xml file can be found inside this repo. So replace those paths with the appropriate paths and it should build and create an .mpack file. That file can be loaded into your VS instance from disk through the extensions menu, and you can distribute it, it should work on any VS with the same version it was compiled with. Or at least, any VS that has the extension versions it depends on.

Hope that helps.