This weeks Friday Dev Tip is a quick one but very useful.
When using Visual Studio (2013 or greater), pressing and holding the Ctrl key when the Intellisense tooltip appears will make it go transparent so you can see any code underneath it.
No more pressing Esc and having to type again!
Right after I install Visual Studio, my next port of call is to update VS to automatically highlight the current file I'm working on in the Solution Explorer.
This can be handy if you need to quick find the file you're working on to figure out where it sits in your project.
Image taken from: https://stackoverflow.com/questions/2314179/how-to-browse-tfs-changesets
Sometimes the easiest thing in the world can take you a while to figure out. Take searching for a changeset in Visual Studio's TFS Source Explorer.
Luckily if super easy to do!
When you're in the Source Explorer, simply press Ctrl + G and the Find ChangeSet dialog will appear. From here you can type the changeset number and press OK.
Alternatively you can click on Find... to open up a more detailed dialog that will allow you filter by dates, by the dev who commited the changeset or by a specific file that was changed.
Easy when you know how!
If you're working on a .Net project that has multiple environments chances are that you will be using web.config transforms that tweak environment specific values in your project.
Typically in your project you would have a base web.config file that would have all your project settings and then a separate config file for all your other environments like QA, staging or production. Sometimes you might want to preview what those config files would look like if you were to rebuild your project for that environment.
This is where SlowCheetah comes in. It's a handy little Visual Studio extension (or Nuget package) that allows you to preview what a specific version of your web.config file would look like after it gets transformed through the build process.
When working on a large project where a single file could have hundreds or thousands of lines of code it can be useful to quickly jump from one method to the next in the current document you have open.
One of the first things I do when setting up my Visual Studio environment is to set up pinned tabs so they display on a new line.
It helps to visually separate out your tabs and gives your unpinned tabs more screen real estate which can only be a good thing when working in large environments where you'd have 30-40+ tabs opened at a time.
Usually when I'm coding I'm using the latest and greatest tech but sometimes I have a need to use a specific version of a plugin or framework for backward compatability with a Visual Studio project.
I ran into an issue the other day where I needed to run a specific version of TypeScript that was older than the current version on my computer. I downloaded the older file and installed it all without any issues. I opened Visual Studio 2012 (as the project I was using requires that version) and everything was working perfectly.
I was using an old Macbook Air (2010) as my ASP.NET web development machine since it was released in October 2010. Since the release of Visual Studio 2012 though it was feeling it's age and things were starting to slow down. Using Visual Studio along with ReSharper was a pretty bad experience on the machine. Opening projects and pages took around 10-30 secs.
I had a look around at actual Windows laptops to see what was on the market but nothing was really taking my fancy. The Macbook Air with it's SSD had spoilt me and the majority of PC laptops only had 256gb drive paired with 4gb RAM which was too low for my requirements.
I've noticed that some members of my team were having difficulties with Visual Studio when using resource files. Any time they would open a file it would crash Visual Studio. As you can imagine this was very frustrating for all involved.
After a quick search I found a pretty neat alterative editor called 'Simple Resx Editor' by Matías. Currently this resource editor is at version 0.6.2 but it is being worked on at the time to improve the functions available.
The main benefit I like about this editor is that you can open all your resource files, side by side and edit them all in one quick go. This is a perfect setup when dealing with multiple languages as it really speeds things up. If you just want to work on one resource file and you need to know what the Key Name values are simply click on the big Key icon on the top of the app. This little app is small, quick to use and really offers a benefit over the built in editor in Visual Studio in my opinion.
The only snag I noticed while working with the editor is that if you had a very long Value field there are no scrollbars showing. I've left a message to Matías about this issue and I'm sure this will be fixed in the next version of this software.
Before I moved over to Visual Studio I used to code in Dreamweaver. One feature within Dreamweaver that I always found handy was the Find All option for finding all occurrences of the search criteria I had entered.
I always thought that this was a feature missing in Visual Studio as there was no option on the 'Quick Find' (ctrl + F) to find all. The only option on the quick find is to 'find and replace all' which usually isn't what I want to do.
The good news is that Visual Studio has a Find All built into it. To find the option (excuse the pun!) all you need to do is hold Ctrl and Shift and press F or click on Edit -> Find and Replace -> Find In Files. This will open up a dialog box that will let you enter your search criteria. Simply hit the Find All button and you will see a list of results returned to you that match your criteria. You can then double click on any of the search results to go directly to that line of code.
It's a small thing but it's handy to know where to go to use that option. Hopefully it will help someone else out.