-
Notifications
You must be signed in to change notification settings - Fork 102
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
Visual Studio 2022 support #333
Comments
Thanks for the request! I will look into this in the next two or three weeks (in fact, MS has already contacted me by me about this). However, I fear that this would mean to support two versions of the adapter ("pre-20222" and "2022 and later"), and I'm not sure whether I'm willing to go that way. I'm not completely sure from the technical point of view, though - I'll let you know. |
@csoltenborn I noticed you are starting to update your VS extension. If you have any issues upgrading the extension please feel free to reach out and we can loop in folks from the engineering team to help out. Do you have an idea of when you expect to publish your new version? |
@acangialosi In fact it's quite the opposite, I fear (see my comment above yours ;-) ). As far as I have understood, there's no way to deliver a single extension which supports not only the new VS 2021, but also VS down to VS2015. Thus, I'd had to split up my extension, and I had to provide two different versions via the VS marketplace. Can you confirm this? |
Hi Christian. I can confirm that it is a requirement for the extension to fork to a separate download page at this time. The marketplace has a work item to support multiple versions from a single page but that isn't available yet.
If a single web page is important you can switch the download page to a reference link to another site that helps users pick the correct download. In that case though the automatic updates form the IDE won't be enable so it isn't a perfect solution.
I am passing on this feedback to the marketplace team as we work with them to get this resolve in the future.
…________________________________
From: Christian Soltenborn ***@***.***>
Sent: Wednesday, November 3, 2021 11:37 PM
To: csoltenborn/GoogleTestAdapter ***@***.***>
Cc: Anthony Cangialosi [MS] ***@***.***>; Mention ***@***.***>
Subject: Re: [csoltenborn/GoogleTestAdapter] Visual Studio 2022 support (Issue #333)
@acangialosi<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Facangialosi&data=04%7C01%7C%7Cf6a05dc8deaa49eb092b08d99f5da081%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637716046742291709%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=j2ClGdxb4akPVHhM%2ByvlZQXugKK5prapGfxZSWAiI70%3D&reserved=0> In fact it's quite the opposite, I fear (see my comment above yours ;-) ). As far as I have understood, there's no way to deliver a single extension which supports not only the new VS 2021, but also VS down to VS2015. Thus, I'd had to split up my extension, and I had to provide two different versions via the VS marketplace. Can you confirm this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsoltenborn%2FGoogleTestAdapter%2Fissues%2F333%23issuecomment-960494640&data=04%7C01%7C%7Cf6a05dc8deaa49eb092b08d99f5da081%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637716046742301665%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1EaAz876IaVHLNPDVUCs4E6g5%2Fk5tDq3sFc3tUqkZ2A%3D&reserved=0>, or unsubscribe<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABJUI4QUHWWPGQYG67LPZA3UKIS37ANCNFSM5GL5FCXQ&data=04%7C01%7C%7Cf6a05dc8deaa49eb092b08d99f5da081%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637716046742301665%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=M1ajsYZkGJUKZOfao94jVd6tVVA%2BdXMyUZX3%2FxyhaXk%3D&reserved=0>.
|
@acangialosi It is less of a problem to have two separate pages on the marketplace (I just mentioned this to make clear what I mean), but to take care of "two version" of GTA. At the moment, I think that I'm not going to go that way. This is mainly because at my current job, I'm not using GTA any more, which is why I have spent less time on this project in the last year or so. Plus, there's MS's fork of GTA (TAfGT), which I assume is already ported to VS2021 (or will be ported soon) - TAfGT is based on an older version of GTA (0.10 or 0.11 if I remember correctly), so users will loose some features, but the most important ones will still be available (plus, my code will continue to live :-) ). In fact, at the moment users have to opt out of using TAfGT during installation of VS and then manually install GTA, and I don't think that many users are doing that anyways. |
Opting out and manually installing GTA is what I do, because TAfGT interprets skipped tests as crashes, which is a dealbreaker for me. For other users wondering about a temporary workaround, what I did was download the v0.18.0 .vsix release of the extension, unzip it, and edit
so that it looks like this:
Then zip up the directory and change the extension to .vsix and install by double-clicking it in Windows Explorer. (I get a message dialog about the GoogleTestExtensionOptionsPage not loading correctly, but I have gotten that in the past, and I always assumed it was somehow related to replacing TAfGT with GTA.) |
@mike10004 That lets me install the extension, but I still can't actually run any of the tests (the output log shows that it promptly throws an exception when I try). Were you able to run tests? TAfGT likewise does not work for me since it reports GTEST_SKIP as an error rather than a skipped test like you describe. |
@bdalessandro I was able to run the tests successfully after rebuilding the solution. |
Wow - I'm kind of honored by you posting a workaround to still use my adapter ;-) In fact I'm a bit surprised that this works (and I'm wondering whether it will continue working with the final version of VS), since the migration guide states that "Extensions with running code must be compiled specifically for Visual Studio 2022."... |
I can confirm that Google Test Adapter 0.18.0 still works with Visual Studio 2022. You can't install it for that Visual Studio of course, but if you just unpack the vsix (it's a zip after all) into some random directory and use that directory as a test adapter when calling vstest.console.exe of VS 2022 then there's no problem with it. :) |
@mike10004 Thanks, yes, that worked!... after fully cleaning & rebuilding, I can run the tests using your workaround. @csoltenborn Your adapter has features that Microsoft's fork does not, like Skipped tests! I was nearly ready to try and rebuild your extension myself, even though i have no C# or extension experience. |
The main problem seems to be, that the Microsoft.VisualStudio.Shell.12.0.dll cannot be found in Visual Studio 2022 (according to the ActivityLog), as it's no longer shipped in the public (\Common7\IDE\PublicAssemblies) or private (\Common7\IDE\PrivateAssemblies) assemblies of that product. Which is why that GoogleTestExtensionOptionsPage error is displayed. The only one being shipped with it is Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0 (in the public assemblies). I've tried to update the libraries to their Version 17. but am then getting various errors (about 22 of them) during building. Mostly "Interop type 'RegistrationAttribute' cannot be embedded. Use the applicable interface instead." and similar. I've cloned the repo and published my changes to my own repo in the branches User/echalone/VS2022Update_Community (for building with VS 2022 Community Edition) and User/echalone/VS2022Update_Enterprise (for building with VS 2022 Enterprise Edition). Maybe somebody can go from there and try to get it to work? I'm a bit lost at that point ^^ |
We are doing that. The entire company! TAfGT is broken on so many levels. Trivial requests on developercommunity are ignored without action (Example1, example2, example3, ...). And the issue list in GitHub lately seems to be a goner - see https://github.com/microsoft/TestAdapterForGoogleTest, no "Issues", problem solved! :/ Tried VS 2022 latest version as of today with TAfGT. Broken. Most tests are not discoverable, without any helpful diagnostics as to what is going on. GTA with VS 2019, same exact solution and projects. Works perfectly. |
Thanks for this, I was able to manually install in VS2022 as well. Has anyone noticed any genuine issues with the Microsoft.VisualStudio.Shell.12.0.dll error, or is it just visual noise? |
The only issue I've noticed is that I can't debug into a unit test. If I set a breakpoint & debug the test, the test will simply fully run & never stop at the breakpoint. |
I see in the test logs it says So I suppose this has to do with the manual installation. |
Simple request for support for Visual Studio 2022.
Installation fails:
Log:
The text was updated successfully, but these errors were encountered: