madskristensen / FileNesting

Nest files in Solution Explorer
Other
118 stars 59 forks source link

Updated for VS2022. #103

Open tekmunkey opened 1 year ago

tekmunkey commented 1 year ago

I have been enjoying this File Nesting extension since VS2015 or so, when my old one from VS2008 quit working! MS killed your existing one somehow with VS2022, and made it silly hard to update, but I got 'er done.

As of this pull request, open the solution in VS2022 and build the solution and you've got a working file-nest extension.

agrath commented 9 months ago

@tekmunkey as your pull request was not merged with the original project, I'm trying to build from your fork so I have a working extension. But I've never built a vsix project before. I'm using VS2022 and have the required feature for extension development. I've done a update-package -reinstall to force reinstall all nuget packages, but just get a build error of: error CS1747: Cannot embed interop types from assembly 'envdte100, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because it is missing the 'System.Runtime.InteropServices.GuidAttribute' attribute. (same for envdte90, envdte90a and Microsoft.VisualStudio.Shell.Interop.11.0) Not sure if I'm missing something that needs to be installed - have you encountered this before? Do you know what I should do? (or perhaps you could just publish a built vsix package somewhere?) Naturally, I've checked stackoverflow before this comment - toggling Embed Interop Types didn't seem to make a difference.

tekmunkey commented 9 months ago

@tekmunkey as your pull request was not merged with the original project, I'm trying to build from your fork so I have a working extension. But I've never built a vsix project before. I'm using VS2022 and have the required feature for extension development. I've done a update-package -reinstall to force reinstall all nuget packages, but just get a build error of: error CS1747: Cannot embed interop types from assembly 'envdte100, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because it is missing the 'System.Runtime.InteropServices.GuidAttribute' attribute. (same for envdte90, envdte90a and Microsoft.VisualStudio.Shell.Interop.11.0) Not sure if I'm missing something that needs to be installed - have you encountered this before? Do you know what I should do? (or perhaps you could just publish a built vsix package somewhere?) Naturally, I've checked stackoverflow before this comment - toggling Embed Interop Types didn't seem to make a difference.

@agrath That's a whole other ugly mess that Microsoft created with VS2022. The problem isn't with this project, but with any VS2022 Extension built from the template with VS2022.

I made this post to MS Q&A Forums while I was working on getting the original project to work.

In the end, I literally had to load the project and let it throw all the errors it wants, then one-by-stinking-one go through absolutely every attached NuGet library. For each and every NuGet library so referenced, I had to remove what was there and then search for it to put it back in. In some cases you have to completely close VS2022 after removing a broken NuGet package, then re-open VS2022 before installing whatever is considered "the current version" of that NuGet package, then close VS2022 again and re-open it before uninstalling the next one.

VS2022 is deliberately engineered to demoralize programmers in the First World.