Wumpf / IncludeToolbox

Visual Studio extension to format, prune, and inspect include directives.
https://marketplace.visualstudio.com/items?itemName=Wumpf.IncludeToolbox
MIT License
51 stars 22 forks source link

Add support for running the addin in VS2019 #68

Closed pjwhams closed 5 years ago

pjwhams commented 5 years ago

For #67 - added some extra classes to enable use of the addin in VS2019. Unfortunately though I can't actually generate the .vsix file in VS2017 (the .dll builds ok, just doesn't generate the .vsix) so I'm unable to test it.

Wumpf commented 5 years ago

Why do you need to generate the vsix in 2017 when you ported the whole thing to 2019? I'll take a stab at the whole thing myself soon

pjwhams commented 5 years ago

I'm building on VS2017, but creating a version of the addin that works on VS2019

dakotahawkins commented 5 years ago

@Wumpf For what it's worth, I recently tried building it in 2017 (couple of months ago, now) and for the life of me I couldn't get it to work. I couldn't find a documented reason for it and everything seemed to be set up correctly. I was going to look at it but the only thing I could think to do is re-create the solution project-by-project.

Wumpf commented 5 years ago

Probably depends on the update-version of 2017, haven't updated mine in quite a while. Quickly tried converting & building in 2019 yesterday evening. It looks promising at first but then is a total mess - the errors I'm getting aren't even deterministic. At some point it supposedly built all fine but didn't work at all. Recreating the projects might be an "easy" out, but let's see how compatibility with 2017 will then play along (I don't mind kicking out 2015 at this point)

dakotahawkins commented 5 years ago

I don't think compatibility with previous versions was the problem, iirc it was the link-time inter-project dependencies. The vsix build step wanted to find DLLs somewhere they weren't, though there was absolutely zero indication anything was configured incorrectly. It was like a post-build copy of an output DLL wasn't happening in time for the vsix to build, despite all the project outputs and interdependencies being set correctly. Turning the build logs all the way up to max didn't help much, I could tell that was the case but there wasn't a reason for it.

I did try recreating some of the projects, though there weren't any applicable differences between those and the original ones. It eventually (and I don't know how) managed to build, so I took the vsix and gave up trying to figure out why it didn't work most of the time. I had kind-of hoped maybe that problem would be resolved in 2019, but maybe it isn't.

Wumpf commented 5 years ago

I managed to recreate the project in VS2019, got VSIX building and have it up and running in vs2019. Tbh I don't really understand what is different from what I tried previously :-/ ... https://github.com/Wumpf/IncludeToolbox/tree/vs2019-compatibility I need to get tests running again and confirm that vs2017 still works. I'm quite sure I broke vs2015, but I am less sure if I still care at this point. VS Marketplace sadly doesn't give me any telemetry on actual usage.

@pjwhams hope you don't mind if I close your PR off and go with my version from here. Thanks for the effort, you definitely gently pushed me into looking at this sooner ;)

pjwhams commented 5 years ago

@pjwhams hope you don't mind if I close your PR off and go with my version from here. Thanks for the effort, you definitely gently pushed me into looking at this sooner ;)

Not at all! Thanks for keeping this project active. I'm trying to get back up to speed with writing VS addins after not touching them for a long time, so this was a useful refresher.