-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support VS 2019 #17
Comments
It should work to be honest. Did you try? -EDIT |
unless the installer is locked to vs2017.. otherwise its just a config thing in the installer. |
That's the problem, the installer is locked to VS2017 and the Extension gallery within VS2019 does not list your extension. |
I installed VS2019 and tested it. There was an issue on installer with dependancy |
I have 1.16.4 installed in 2019 Pro, but get the below error when running MSTest unit tests.
Hopefully this helps. |
I am looking into this. I noticed this after installing but didnt get round to it yet. |
I too get this exact issue. Using 1.16.4 on VS 2019 16.0.3. Unfortunate as I was hoping to use this. |
I should note for others as well, you actually need to uninstall the extension to be able to run tests again as disabling it didn't affect the error. |
Sorry guys... Something has changed in VS2019 and I am not sure when I will have time to sort it out. |
Well I found the problem.. They changed the TestWindows dll in VS2019 so when you try and run a test I try to use reflection to get some information about what is going on with the tests. Why they did is beyond me but I am too stupid to work out how to get this information using the "Extensions way" because there is no docs anywhere about this. I got this working in 2017 thanks to hours of debugging Visual Studio in Visual Studio and trying all sorts of magic out. The thing I was using in VS2017, the DLL I had to manually reference had a public sealed class and the 2019 version is internal sealed which prevents me from casting to this type. I can probably go deeper into reflection and get this... but for the love of god.. why?!
So this is why we are getting the error message ... access type 'Microsoft.VisualStudio.TestWindow.Controller.TestRunConfiguration' failed. |
Well digging in a bit deeper everything got changed to internal. If I was conspiracy theorists I would say that one of the Microsoft guys from the Coverlet git saw this and the only reason to close this up to keep this kind of feature for Enterprise users only. But I have no proof of that, I am tired and pissed about this and just speculating. So sorry guys.... No VS2019 support! |
Ah man don’t you hate when they do stuff like this? I wonder if it was to prevent not having Enterprise to get these stats. I wonder how they do it in DotCover? |
Well if I play the conspiracy card I have to be fair and play the good guy theory card too. I believe VS2019 is going to force all extensions to run async and they are probably locking down sync access like this down. The thing is the plugin and coverlet run under the VS Thread, luckily its not a massive issue because it doesn't slow down usage while writing code.. and when we run tests we usually go make a brew so nobody notices a minor speed slowdown. So really.. I have to redo everything to be async and it would be nice if dependency injection worked from VS into extensions (which it doesnt) And all the shit I have seen is still COM hooks, weird export attributes and then my attempt with meta programming. I have actually stared at the DotCover (and others) source code for hours. I can hardly make head and tails of it but I have literally nicked their VisualStudioExtensions file to help with a few things. But I just cannot work out how they hook into the Test Window. Usually when I struggle with these things its because I am doing it wrong. But I cannot find any good useful information about Extension developing (like not the shitty examples that avoid using anything useful from VS) 😢 So why do I need the test window?
I have spent lots of time trying to get that information from the IDE Interfaces but its just not available. The only reason I found the Configuration object was because I installed Rosyln Analysers that expose private and polymorphic things while debugging... and I spent a lot of time in that shitty little inspector window clicking into layers of properties trying to find something useful. And now they took it away. |
I replied before I was staring at the DotCover source code... there is no source code.. I got confused with another open source project AxoCover I think. The way DotCover does it is by running its own TestRunner out of process. They gather the data then from their own internal gubbins. |
Sad thing it didn't work in 2019 since it looks to be a simple and handy extension, but could you remove 2019 from supported versions on the marketplace until this is solved? So people doesn't get confused? |
Do you need TestWindow.dll for the basic watch coverage.json files and color gutters functionality? |
Ahh yes. I completely forgot about that aspect I am so frustrated with this automatic thing. |
@ppumkin, you say
Given the trouble we've had with reflection, I have been thinking a bit about possible alternative approaches.
I eventually realised the question to ask is: How does coverlet itself handle this? Coverlet has a package for direct VSTest DLL integration. Another package is offered for MSBuild integration, but that doesn't help us because the VS test runner uses... VSTest directly. Now, the coverlet VSTest integration is essentially a So IMHO we don't really need any code here. Instead we just need documentation, mainly an example
And hopefully the answer here is similar: we need a What do you think? Is this worth me or you prototyping? |
I know what I am trying to do is probably incorrect. I have learnt about this years ago in development. If it seems too difficult it’s probably because it’s the wrong way 😂 I am a newb to extensions and what you have proposed is a different way. Probably the correct way. So yes please try and make a branch if you will. All we need to know is to attach coverlet before the test runs... ? And when they finish to aggregate the results. |
https://github.com/Microsoft/vstest/tree/master/test/TestAssets/OutOfProcDataCollector This looks promising. I am sure I have come across before... not sure why I decided to go down reflection route. Probably couldn’t get enough information out of that data collector. |
Ah. Well hopefully I have better luck then! I am amused by your comments about difficult things being the wrong way. Yes. But sometimes wrong code is the only way! |
Please try it. I hope you can find a solution. |
Good news. This approach works. The code needs tidied up, but I hope to contribute it next week. Turns out this is bleeding edge stuff. The coverlet DataCollector was only released a week ago, the day I started looking at this! It just wasn't available when you took a look at data collectors. |
Ahhh right. Very interesting. I have a feeling your findings will make it a lot easier understand now. But is this stuff is compatible with VS2017 ? Or that can still stay with the fugly reflection garbage? Cannot wait to see how you fixed it 👍 |
Ehi guys! Any update on the VS2019 compatibility? |
@iainnicol Any news on this issue? |
Ah, sorry, mainly I got distracted by other things. I will work on this this weekend. I had a minor but required pull request rejected for |
You mean a PR for coverlet right ? Did they for coverlet too?
…________________________________
From: Iain Nicol <[email protected]>
Sent: Wednesday, August 14, 2019 8:35:45 PM
To: ppumkin/PrestoCoverage <[email protected]>
Cc: Piotr Kula <[email protected]>; Mention <[email protected]>
Subject: Re: [ppumkin/PrestoCoverage] Support VS 2019 (#17)
Ah, sorry, mainly I got distracted by other things. I will work on this this weekend.
I had a minor but required pull request rejected for Presto itself, which is unfortunate. I may need a hack. Worst case, I suppose, isn't that bad because Presto has already been forked.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#17>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAJRDE667A3OFNVH2MWJKJLQERGADANCNFSM4G6VA5TA>.
|
Oops. I indeed meant coverlet. We need coverlet to target netstandard (coverlet-coverage/coverlet#470) so that the coverlet VS Test collector works within Visual Studio. Otherwise their VS Test collector only works from the console. So what to to? Hopefully VS has changed and now works with netcoreapp. If not, maybe we can still consume the coverlet nuget package, but hack the metadata to look like netstandard. Else we have to fork. I know you've had to fork coverlet before, but I don't want to add a second reason for the fork! |
What if we fix what we need in our fork. There is nothing changed there really so we could upgrade the pull, upgrade it to net standard ? And PR it back maybe ?
…________________________________
From: Iain Nicol <[email protected]>
Sent: Saturday, August 17, 2019 2:50:30 PM
To: ppumkin/PrestoCoverage <[email protected]>
Cc: Piotr Kula <[email protected]>; Mention <[email protected]>
Subject: Re: [ppumkin/PrestoCoverage] Support VS 2019 (#17)
Oops. I indeed meant coverlet.
We need coverlet to target netstandard (coverlet-coverage/coverlet#470<coverlet-coverage/coverlet#470>) so that the coverlet VS Test collector works within Visual Studio. Otherwise their VS Test collector only works from the console.
So what to to? Hopefully VS has changed and now works with netcoreapp. If not, maybe we can still consume the coverlet nuget package, but hack the metadata to look like netstandard. Else we have to fork. I know you've had to fork coverlet before, but I don't want to add a second reason for the fork!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#17>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAJRDE2VCBZB6A45CW2ONYTQE7XZNANCNFSM4G6VA5TA>.
|
Any updates on this? |
Not yet sorry. Will have a look next week I hope. Somebody had an idea but not sure if it worked. There are no guides to any of this 🧐😕
…________________________________
From: Cédric Menzi <[email protected]>
Sent: Tuesday, August 27, 2019 11:37:55 AM
To: ppumkin/PrestoCoverage <[email protected]>
Cc: Piotr Kula <[email protected]>; Mention <[email protected]>
Subject: Re: [ppumkin/PrestoCoverage] Support VS 2019 (#17)
Any updates on this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#17>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAJRDEY5YRVT4RAY7CW5WR3QGTYXHANCNFSM4G6VA5TA>.
|
@iainnicol I have a fork running here https://github.com/ppumkin/coverlet we can change whatever we need to get this going. I am also building the Experimental Coverlet package using that fork, which on on the VS Store. Problem is that coverlet do not want to "open" the coverlet.core because they afraid to change API's that may cause backlash from the community... but also they not offering any solutions so i just forked it and told them im going to build the core one on my own responsibility. They said OK. So if you got a coverlet PR, do it against my fork, i will rebuild the package that this project uses and lets get VS2019 working... ??! 😄 |
I released 1.16.5 that will not cause that dumb ass exception to show any more.. but the automagic coverage DOES NOT WORK IN 2019 YET You can only use the watch folder function in VS2019 for NOW.. atleast something for the time being. Sorry for taking so long to get to it. |
Just found out your extension after almost giving up hope on coverage-tools for VS.
Thanks for the amazing work. This is OSS, so dont feel sorry for progress taking its time! |
I'm using VS2019 Professional and get no gutters. The json report is generated under |
I have the same issue as @adrianhara with VS2019 Professional. I have coverage output, but nothing loaded in VS. |
I'm using vs2019 but this extension isn't working.. |
@ppumkin I think this resolve the problem of internal classes/methods: dynamic testRequestConfiguration = stateArgs.Operation.GetType()
.GetProperty("Configuration")
.GetValue(stateArgs.Operation);
var sources = testRequestConfiguration.GetType()
.GetProperty("TestSources")
.GetValue(testRequestConfiguration);
//if (testRequestConfiguration.Debug)
// return;
foreach (string testDll in sources)
{
...
} I also saw that the Debug property has been removed... |
Tried 1.16.6 today with Visual Studio 16.3.10 and still not working. Getting:
|
same issue as @dozer75 , when running the tests on Vs 2019 16.3.10. |
@ppumkin had already commented above:
|
@eduardocp Well, he stated that the "dumb ass exception" shouldn't occur anymore after 1.6.15, but it does in 1.6.16, that's why I added the message... :) To clarify to anyone else what's this means: However; if you run manually using |
I'm unable to install it on VS Professionnal 2019 Version 16.2.5
|
It's nearly half-year since @iainnicol checked that the approach with DataCollectors works and a fork of Coverlet has been created. Any progress? I know from own experience that finding time might be almost impossible. I would like to see this working so maybe I could help? |
Hi Bartosz. Yea I have been meaning to get back to this. I would probably spend some time tonight to look at the forks ? I didn’t see where the data collectors have been used to work ?
If you can put some links in it will
Make it faster for me to discover this and fix it maybe
…________________________________
From: Bartosz Domżalski <[email protected]>
Sent: Monday, February 10, 2020 10:48:05 AM
To: ppumkin/PrestoCoverage <[email protected]>
Cc: Piotr Kula <[email protected]>; Mention <[email protected]>
Subject: Re: [ppumkin/PrestoCoverage] Support VS 2019 (#17)
It's nearly half-year since @iainnicol<https://github.com/iainnicol> checked that the approach with DataCollectors works and a fork of Coverlet has been created. Any progress? I know from own experience that finding time might be almost impossible. I would like to see this working so maybe I could help?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#17>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAJRDE5CP3SAREZJ4KBBWZ3RCEWGLANCNFSM4G6VA5TA>.
|
I did a quick look around the forks but did not spot where it could be that those collectors were used. I only infer that base on the following two comments: description of possible solution and approach works. |
Ok. I think they thought that would work. Will have to spend some time around it.
…________________________________
From: Bartosz Domżalski <[email protected]>
Sent: Monday, February 10, 2020 11:21:43 AM
To: ppumkin/PrestoCoverage <[email protected]>
Cc: Piotr Kula <[email protected]>; Mention <[email protected]>
Subject: Re: [ppumkin/PrestoCoverage] Support VS 2019 (#17)
I did a quick look around the forks but did not spot where it could be that those collectors were used. I only infer that base on the following two comments: description of possible solution<#17 (comment)> and approach works<#17 (comment)>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#17>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAJRDEZEZYAXP772BKZ2LZLRCE2EPANCNFSM4G6VA5TA>.
|
Please add support for Visual Studio 2019.
The text was updated successfully, but these errors were encountered: