It’s a little opposite of the topic, but am I the only one who’s noticed a considerable downturn in the productivity of VS?
Yesterday I wanted to import “Microsoft System Center Orchestrator Web Service” in a C# project, something which used to be a simple “add service reference”, only to be greeted by “we don’t import ODATA services this way anymore...” message and sent to some obscure framework for it. The first framework didn’t work with authentication and the second was so complicated that we ended up building it in Python instead of C#, using Visual Studio Code instead of Visual Studio.
That last bit seem to be a common thing. More and more we use VSC instead of VS, and last year it made us downgrade our enterprise subscription to VS because it didn’t seem worth it anymore.
Don’t get me wrong, it’s a decent article, I just didn’t value being reminded of TODOs as much as the actual time saving features which are slowly disappearing one by one. I mean, you can’t even build a non-empty project without drowning in bloat anymore. While it’s certainly rarely advisable to so in the first place, it can be useful with standard project bits on internal projects. We used to use MVC for that, now we use Django.
I agree, though maybe not with .Net core. It’s a personal preference, but I like the mix between VSC and the .Net Core CLI better than VS.
.Net isn’t set in stone in our shop though. It’s been good to us for almost two decades, but recently it’s often in the damn way. Like with the orchestrator webservice. It’s Microsoft techs at both ends, yet it’s easier to build it in python, just doesn’t make sense.
Visual Studio anti-productivity feature: if you want to turn "convert warnings to errors" on, or change .NET framework level, in a large C# solution, you have to do it in each individual project. By hand or by writing a program to rewrite the XML.
The whole "project" paradigm seems to have always been a little bit broken, rather than just having a clearer "sources" and "targets" definition.
- Typing the text "nguid" (new guid) will generate and let you pick from a GUID in a popup list inline, while coding.
- If you're debugging multi-threaded apps and in a breakpoint, you can open the Threads list and Freeze other threads to stop them running while you debug a particular thread and step+continue etc (wish there was an easier way?)
- ReSharper is amazing (https://www.jetbrains.com/resharper/)
I'd been using Visual Studio for quite a while before I discovered it supported something like Vim's visual block mode - you can use alt-shift to select (and then edit) blocks of text.
I highly recommend VsVim[0] if you're a vim user. It's very lightweight and complete, it persists your register contents, shows you visual block ranges on the left side, supports macros, and it plays well with intellisense.
The problem is that Rider doesn't have some features that are a must-have for me, like Edit and Continue, Immediate Window, Docker-Compose debugger and some others.
As F1 is pretty obvious I'll list some other obvious ones:
Right-click on something, choose 'go to definition' - see the code for that method or whatever. When you're done, the 'back' button in the toolbar can take you back. Also F12 and Alt-F12 do same/similar
Highlight a method or class name, right-click, choose Rename - will allow you to rename it and then will also rename all references to it
Right-click a block of code, choose 'quick actions and refactorings', then 'extract method'. It will pull out the code, figure out the parameters and create a new method for you.
24 comments
[ 6.7 ms ] story [ 144 ms ] threadYesterday I wanted to import “Microsoft System Center Orchestrator Web Service” in a C# project, something which used to be a simple “add service reference”, only to be greeted by “we don’t import ODATA services this way anymore...” message and sent to some obscure framework for it. The first framework didn’t work with authentication and the second was so complicated that we ended up building it in Python instead of C#, using Visual Studio Code instead of Visual Studio.
That last bit seem to be a common thing. More and more we use VSC instead of VS, and last year it made us downgrade our enterprise subscription to VS because it didn’t seem worth it anymore.
Don’t get me wrong, it’s a decent article, I just didn’t value being reminded of TODOs as much as the actual time saving features which are slowly disappearing one by one. I mean, you can’t even build a non-empty project without drowning in bloat anymore. While it’s certainly rarely advisable to so in the first place, it can be useful with standard project bits on internal projects. We used to use MVC for that, now we use Django.
As someone that works mostly in a .NET full stack context across native and Web, VSC still has a lot of catchup regarding VS capabilities.
.Net isn’t set in stone in our shop though. It’s been good to us for almost two decades, but recently it’s often in the damn way. Like with the orchestrator webservice. It’s Microsoft techs at both ends, yet it’s easier to build it in python, just doesn’t make sense.
The whole "project" paradigm seems to have always been a little bit broken, rather than just having a clearer "sources" and "targets" definition.
- Typing the text "nguid" (new guid) will generate and let you pick from a GUID in a popup list inline, while coding. - If you're debugging multi-threaded apps and in a breakpoint, you can open the Threads list and Freeze other threads to stop them running while you debug a particular thread and step+continue etc (wish there was an easier way?) - ReSharper is amazing (https://www.jetbrains.com/resharper/)
What do you like about Resharper these days? The performance impact got too much for me so I got rid of it after being an avid user for many years.
VS-inbuilt Go To Everything, refactorings, and some Rosyln Analyzers like Roslynator do most of what I was using Resharper for.
0. https://marketplace.visualstudio.com/items?itemName=JaredPar...
Besides that, I love the performance.
Right-click on something, choose 'go to definition' - see the code for that method or whatever. When you're done, the 'back' button in the toolbar can take you back. Also F12 and Alt-F12 do same/similar
Highlight a method or class name, right-click, choose Rename - will allow you to rename it and then will also rename all references to it
Right-click a block of code, choose 'quick actions and refactorings', then 'extract method'. It will pull out the code, figure out the parameters and create a new method for you.
Ctrl + r + r (twice in a row) is the shortcut for this, super useful
The back arrow is useful too but on VS 2017 I believe they added the Peek Definition so you don't need to go out of the original file you're checking.
alt + ; then p to publish the current file
ctrl + k then d to format the document