-
-
Notifications
You must be signed in to change notification settings - Fork 27
Updated dependencies and added VS22 compatibility #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1.1.2 Dependency updates and VS22 compatibility.
|
The extension is working as expected in VS2022, but it fails to load in VS2019. This is the error in the activity log: Looks like it's trying to load the VS2022 version of that assembly. Can it be made to work with both versions? |
|
This comes from using Microsoft.VisualStudio.SDK 17.x instead of 16.x. If I use 17.x, I can modify and build the project in VS22, but not in 16.x. It simply throws an error, which says it cannot find the proper .dll. If I change it to 16.x, I can build the project with VS19 and slight modifications, but the extension will only install on VS19, not VS22 (not taking into consideration, that it is not capped to VS version 17.0). So we got to a crossroad. This is unfortunate, but 1.1.1 is out, and probably works with VS19. 1.1.2 would only be working with VS22. That means building and using the plugin with VS22. Should I change it to 2.0.0, and update the README.md? |
|
I don't think we should drop VS19 support, as it's likely many people are still using that. I tried changing back the versions for
Not sure if something's messed up with the assembly versions, or if that property was just removed in VS22. In the worst case, if we can't manage to solve this, I would prefer to have separated project and manifest files for the two versions and distribute two VSIXs. |
| var mainWindow = dte.MainWindow; | ||
| mainWindow.Activate(); | ||
| SetForegroundWindow(new IntPtr(mainWindow.HWnd)); | ||
| SetForegroundWindow(mainWindow.HWnd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't compile when targeting VS19. The following should at least build with both versions:
| SetForegroundWindow(mainWindow.HWnd); | |
| SetForegroundWindow((IntPtr)mainWindow.HWnd); |
Whether it works in VS22 at runtime when built from VS19, I don't know. If it doesn't, we could use reflection to do the proper conversion on both versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It builds, but the main problems is with installing the extension. This problem is changing with Microsoft.VSSDK.BuildTools or Microsoft.VisualStudio.SDK getting 17.x versions. I would recommend making a 1.1.2 version with VS19 support, which enables either Community, Pro and Enterprise versions to use the extension, and making a 2.0 version with VS22 support. I seperated the two versions locally, which is working right now.
| <ProductArchitecture>x86</ProductArchitecture> | ||
| </InstallationTarget> | ||
| <InstallationTarget Version="[16.0,18.0)" Id="Microsoft.VisualStudio.Enterprise"> | ||
| <ProductArchitecture>x86</ProductArchitecture> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ProductArchitecture nodes cause a build error on VS19. It's not recognized there. Do we need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we don't need it. I am working on a solution, which just seperates the VS22 version as 2.x and VS19 version as 1.x, because it would be easier to work with short term. I don't know, how much attention this extension will get, so it would be a quick, not ideal, but practical fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. If I remove the cap, I can build with both VS19 and 22, but it still only installs on VS19 only, with Microsoft.VSSDK.BuildTools set to 16.11.35 and Microsoft.VisualStudio.SDK set to 16.10.31321.278 (kinda the last versions VS19 works with). I assume VS22 works with only Microsoft.VisualStudio.SDK 17.x and Microsoft.VSSDK.BuildTools 17.x.
…19, VISIT 1.X BRANCH TO WORK WITH VS19.
|
I created a branch called 1.x on my fork, which contains the VS19 usable version of the extension. |
|
Maybe I should not have updated the Test's dependencies, reverting these soon. |
|
Makes sense if we can't support both versions with the same package. I created the 1.x for VS19. |
|
Yeah, these merge commits are a bit difficult for me to handle, I don't feel experienced enough. Would be nice if you take care of this. |
|
Thanks! I've created a release for v2.0.0. |
Changed some dependency settings to include all VS22 Community, Pro and Enterprise versions. Works as intended in VS22 Community build 17.0.4. Updated old dependencies to work properly with VS22.