danielscherzer / GLSL

VSIX Project that provides GLSL language integration.
257 stars 28 forks source link

Add Visual Studios 2020 Support #88

Closed TheEndHunter closed 2 years ago

TheEndHunter commented 3 years ago

This pull adds support for installing the extension in visual studio 2022 by splitting the project into 3 distinct projects(currently retains the old one for now, but it's not counted here); A Shared Items Project for the code that the 2 executables share(100% at the moment) A x86 Project for building the x86 vsix for vs2017-2019. A x64 Project for building the x64 vsix for vs2022(and up)

this pull also cleans up some of the code, removing whitespaces and formatting the code files to be more consistent.

feel free to try download on of the vsix build of the extension from my fork of the repo and try them! feedback is needed, and you can report issues with those builds in my fork's issues until it gets merged here.

I have an issue open for feedback too Here

TheEndHunter commented 3 years ago

all checks have passed, seen some warnings appear in the appveyor log that might need looking into, could be due to setting the language version, but that was needed to get it to complete building.

danielscherzer commented 3 years ago

I downloaded your master branch (3c3a441e3283c892d3f24e341c8f7b0824b5d7cf), compiled it (I only have VS 2019 available for now) with no warnings!

I start debugging in the experimental instance. The extension does nothing. I put a few breakpoints in to check if any of those break, but nothing. When I go to the extensions options page I get an "An error occured while loading this option page"

The activity log: ActivityLog.zip

TheEndHunter commented 3 years ago

got it, the error is because it's trying to load an mscorlib v17, ill look into it I assume it's related to migration issues mentioned in #86

TheEndHunter commented 3 years ago

I have successfully managed to get the split project to work! but I need someone with vs2019 or vs2017 to test it as I don't them, but in theory since no code has changed the projects should work exactly as the current version with no noticeable changes(hopefully)

danielscherzer commented 3 years ago

Hi! I did a quick check of https://github.com/TheEndHunter/GLSL with 80f7aeb1cc8404c19d283ac7d85cc07df38b6c9b All 3 versions of the project did not work with VS 2019. Compilation did not yield any errors, but executing in the experimental instance did not start the extension, so no syntax coloring...

TheEndHunter commented 3 years ago

ok, I'm downloading vs2019 now to take a look, see if I can replicate. Did you manage to get any breakpoints triggering? or is it nothing at all, extension not loading?

danielscherzer commented 3 years ago

No breakpoints were triggered, sorry.

TheEndHunter commented 3 years ago

just had a look. your right, non of it works... not sure why at the moment. ill try and figure it out.

TheEndHunter commented 3 years ago

@danielscherzer Pushed a fix, turns out I forgot to set the SDK version in the x86 project to match the minimum SDK needed, so after a little tweak you can now hit breakpoints and everything builds fine!

danielscherzer commented 3 years ago

Quick feedback: GLSLx86 is now working on my VS2019

danielscherzer commented 3 years ago

Interesting read: https://cezarypiatek.github.io/post/migrate-vsix-to-vs2022/ I checked on the marketplace: for now I cannot publish 2 vsix for the same extension....

TheEndHunter commented 3 years ago

@danielscherzer Hey, I'm testing a new branch Here that allows you to build a VSIX that has both architectures in the extension, but I'm having a problem where you get warnings about the mismatched architectures and the conflicting assemblies for the 2 different builds, which I have tried to suppress in project as it still builds fine and the VSIX does run without complaint. Also, for some reason you cannot build twice, you have to rebuild or clean then build otherwise it complains about access to an assembly, I assume its to do with locking the file building? any ideas for fixes would be appreciated.

danielscherzer commented 3 years ago

I did a checkout of your SingleVsixBuildTest and my guess is that one cannot mix amd64 and x86 in one assembly. I tried around and found no quick solution. Changing my VSIX to amd64 seems also not to work. I get a BadImageFormat Exception when I try this.

TheEndHunter commented 3 years ago

I did a checkout of your SingleVsixBuildTest and my guess is that one cannot mix amd64 and x86 in one assembly. I tried around and found no quick solution. Changing my VSIX to amd64 seems also not to work. I get a BadImageFormat Exception when I try this.

Yh after looking into a little more and Tring a couple more things, I have abandoned the idea for now. The only thing I can think of is having 2 marketplace extensions, one called "Glsl Language Integration", and the other called "Glsl Language Integration for vs2020" would work as a temporary solution until they place allow for multiple vsix to be uploaded per extension on the marketplace. But that's up to you.

TheEndHunter commented 2 years ago

@danielscherzer I has a look through my fork of the code over the last day or two, I'm am personally happy to says it ready to merge whenever you are at this point, unless there are any changes you would like me to make.

danielscherzer commented 2 years ago

Thanks! I will look through the code and do some tests and merge.

danielscherzer commented 2 years ago

After getting Appveyor to correctly patch the extension versions, I created a second extension on the marketplace (https://marketplace.visualstudio.com/items?itemName=DanielScherzer.GLSL2022) and referenced it from the original one. I put a reference to your contributions into the changelog on github. Thansk for all your effort! If you want to be mentioned more prominently just tell me were. Please check if the new version is working for you as expected.

TheEndHunter commented 2 years ago

After getting Appveyor to correctly patch the extension versions, I created a second extension on the marketplace (https://marketplace.visualstudio.com/items?itemName=DanielScherzer.GLSL2022) and referenced it from the original one. I put a reference to your contributions into the changelog on github. Thansk for all your effort! If you want to be mentioned more prominently just tell me were. Please check if the new version is working for you as expected.

don't worry about mentioning me more prominently, I'm grateful for the mention at all, thankyou.