Open GSonofNun opened 2 years ago
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)
@acangialosihttps://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 GitHubhttps://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 unsubscribehttps://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.
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 extension.vsixmanifest
to change
<Installation InstalledByMsi="false">
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Pro" />
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Enterprise" />
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Ultimate" />
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Community" />
</Installation>
so that it looks like this:
<Installation InstalledByMsi="false">
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0, 18.0)">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
</Installation>
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.
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?
@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 (
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 ^^
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
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.
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
extension.vsixmanifest
to change<Installation InstalledByMsi="false"> <InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Pro" /> <InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Enterprise" /> <InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Ultimate" /> <InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Community" /> </Installation>
so that it looks like this:
<Installation InstalledByMsi="false"> <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0, 18.0)"> <ProductArchitecture>amd64</ProductArchitecture> </InstallationTarget> </Installation>
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.)
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?
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.
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 [13:42:03.886 ERROR] Debugging is only possible if GoogleTestAdapter has been installed into Visual Studio - NuGet installation does not support this (and other features such as Visual Studio Options, toolbar, and solution settings).
So I suppose this has to do with the manual installation.
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
extension.vsixmanifest
to change[...]
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.)
Thanks for this, I was able to manually install in VS2022 as well.
Sadly I didn't get this workaround to work anymore. I'm using Visual Studio 2022 Version 17.6.4 and after installing and starting Visual Studio I get this error message:
Test Explorer shows this line:
Is there anything that I can do about it?
Simple request for support for Visual Studio 2022.
Installation fails:![image](https://user-images.githubusercontent.com/3924712/138121302-9af8a3d6-aa61-4b87-b609-66a4730591e1.png)
Log: