claudiolassala

Claudio is a Principal Consultant at Improving Houston. He has been developing software for 25+ years. When not building software, consulting with clients, doing presentations, delivering training, or hanging out with his family, he can probably be found working on his music.

Homepage: https://claudiolassala.wordpress.com

Switching Windows Layouts in Visual Studio 2017

A whole decade ago (yikes, I’m getting old…) I wrote about how I was Organizing Windows and Multiple Monitors. I still use that approach when I’m working on a PC with dual monitors. The only thing that has changed is how I get it to work in Visual Studio 2017.

So, let me explain the steps I take.

I first set all the windows in VS according to how I want them when I’m focused on coding. In that case, I want to make full use of all my real state, which means, use my screens wisely. My dual-monitor setup look somewhat like this:

Once I found my perfect setup, I then export my settings by going to Tools -> Import and Export Settings…:

I then unselect all settings and select only General Settings -> Windows Layouts:

I export the settings to a dual-monitor.vssettings file on a c:\tools\settings folder.

Next, when working using a single monitor (which is usually the case when I’m in a conference room and projecting my screen), this is what my single-monitor setup looks like:

Once I’ve found my perfect setup for single monitor work, I export the windows layout settings to a single-monitor.vssettings file to my c:\tools\settings folder.

Now, whenever I want to switch between the different layouts, all I need to do is to import the settings accordingly.

But if you’re switching between layouts too often every day, then automate the process of importing settings!

It seems like VS 2017 has dropped support for Macros (seriously?). Fortunately, there’s a nifty extension out there called Visual Commander (I mentioned I was using it for Toggling Visual Studio CodeLens On/Off, remember?).

Once you’ve installed Visual Commander, you are welcome to download the commands I created to import single/dual monitor VS settings and import it into your Visual Commander setup. Once you’ve imported it, you can easily switch between layouts by using the commands under the VCmd menu:

The VCmd commands are simple macros that automate that simple process.

Also, if being two clicks away (or Alt+C + a few key strokes to access the menu option and hit Enter), you can set a shortcut in VS to access those commands! (See this other post if you need to learn how to do that).

Advertisements

Leave a comment

Improving is Improving

The company I work with is doing what it does best: Improving is improving!

We have recently finalized a partnership with ProSource Solutions, a management and information technology consulting firm headquartered in Ohio. This merger will continue growing the value we can bring to our clients, our services, and adds great expert Improvers. Those new Improvers significantly strengthen the breadth and depth of our technical consulting services, and training offerings.
 
Furthermore, it will expedite efforts for Improving to pursue its strategy to grow vertical technology specializations, through the delivery of Microsoft and cloud computing based solutions. ProSource is a preferred Microsoft Partner and has been awarded 5 consecutive “Top U.S. Partner of the Year” awards from Microsoft.
 
With similar company values and a focus on culture, we see significant alignment in business strategy and overall approach. It remains our top priority to establish and maintain trust not only with each other but with our clients, partners, communities, and others.
 
We welcome ProSource Solutions to the Improving brand and look forward to our future collective growth together!
 
To read more about this acquisition, please visit http://improving.com/thoughts/improving-acquires-prosource-solutions

Leave a comment

What opinions are worth sharing?

In the last 40 days or so, I’ve published 20 posts (including this one). That’s my biggest number of posts ever! A personal goal I’ve had in the last two or three years has been to make this blog more active, and that’s what I’m doing.

The high number of posts has been motivated by my realization that I’m often asked about my opinion on a number of things, so I might as well share my opinions through this channel, as it may be of interest to a wider audience. Also, I can always point people to a blog post in case I ever get asked the same thing again.

Now, what opinions are worth sharing? I’m sure the answer to that question varies from person to person. In my case, I’ve been sharing both requested and unrequested opinions on things I care enough (at least at the time) about.

Of course, opinions can change. If I change my opinion on something, I’ll probably blog about it.

My bottom line is: since I started writing down my thoughts on a number of things people ask me, I haven’t run out of ideas on what to post about. People can always ignore/delete a post. I can always go back to my posts to think about my progress on certain aspects of things I do. Some of my posts may get my readers to think about things they weren’t thinking of before. If one post is ignored by 1000 people, but helpful to a single person (which could even be myself!), then post was already worthy.

And the next time I’m thinking whether something is worth a blog post or not, I’ll think of this piece of Internet Wisdom:

Leave a comment

Why sort class members alphabetically?!

I personally do NOT like sorting class members alphabetically. Once in a while I run into developers who prefer it sorted alphabetically, usually on the grounds of believing it’s easier to find things around that way. I disagree. Let me explain why…

Take the following class as an example:

Now here’s the same class with the members sorted alphabetically:

To me, the code in the first example is much easier to understand. Related properties are grouped together, and they’re listed in an order that makes sense.

If I do want to find something alphabetically, I can use the dropdown menu that lists all members that way:

Or, better yet, I can hit Alt+\, which is the Resharper shortcut to “Go to File Member…”:

Leave a comment

MS-Test comes back to bug me

I gave up on MS-Test 7 years ago. Back in 2015, my buddy George summed up our collective experiences working on the same project and deciding Why not MS-Test. Since that one project back in 2010, I’ve used xUnit in .NET projects.

Helping out with a project that uses MS-Test v.2, I was at least hoping things were better in that front. Silly me. For a framework that’s at least 15 years old, being in version 2 should cement my expectations pretty low.

In order to clean up some tests, as well as improve readability on them, I’ve created a baseclass to expose some things a specific group of tests share. As soon as I moved this class into a separate project, which would be referenced by other unit test projects in the solution, things broke down.

The error I was getting was specific to test methods that took in parameters in order to support DataRow (one of the things addressed by MS-Test v.2). In other words, a test like this would crash:

Searching around we found info on an issue with inheritance support for base classes that resides in different assemblies.

I tried using ILMerge to merge the two assemblies together (the unit test project + the TestUtils project). Worked fine on my machine. The build server wasn’t too happy with it, though. I used the MSBuild.ILMerge.Task NuGet package, which was compiled agains Microsoft.Build.Utilities.v4.0. Apparently, that introduces bigger issues.

In order to move on with life, we decided to include the file as a linked file so it can be reused in all unit tests projects that need it.

Leave a comment

Are you doing it?

“If you spend too much time thinking about a thing, you’ll never get it done.”
Bruce Lee

That’s one of the quotes that inspire me. I read it again today and thought it was worth writing about it. As I started to write, I though, “hey, this feels familiar… I think I’ve already written something similar to that before!”. Yes, I did: Stop Thinking About It and Just Do It!

While I didn’t have Bruce Lee’s quote in mind when I wrote that other blog post, the main idea is the same. A year and a half has passed since that post. As I ponder over it, as well as today’s quote, I realize I’ve been following a “think less, do more” approach.

For example: one of my goals back then was to post more often to this blog. In the last 18 months I’ve posted about 54 times, which averages 3 posts/month. That’s a heck of a lot better than in previous years when I had periods of two years without any post.

Another thing I wanted to do was to start taking my sportbike to the race track, which I have been doing quite often. In order stay focused and motivated, I also started a YouTube channel to document and share my progress: 3-Lap Rider

There are other things that have come out as a resut of this mindset. I think it’s great to look back and see the results of changes I’ve tried, taking the time to see if the change has worked out or not, whether it needs adjustments, whether it stimulates other changes to be tried out, etc.

Leave a comment

Visual Studio: Who uses the Standard Toolbar?

Following my trend of hinding everything I don’t need on my environment, another default thing I get rid of is the Standard toolbar in Visual Studio:

The actions available in that toolbar which I use all day are Save All and Start Debugging, so I simply use the shortcuts Ctrl+Shift+S and F5, respectively. Why would I want that toolbar up there taking up screen real state? Yup, I don’t! I just get rid of it: right-click in that area and uncheck Standard:

Resulting in…

Much better. One less thing I have no need to be seeing all the time!!

Leave a comment