14.8.13

SQL: How to shrink LDF (transactional LOG file)

A lot of us who uses complex systems of DevOps, ALM, deployment etc. usually need to do a basic maintenance for the system's database.

One of the common issues that we are dealing when using an old Microsoft SQL server is the size of the LDF file (transactional log).
There are a lot of post that explain what it means to shrink, what're the theories behind etc.
So instead of the yada yada, just copy and paste (don't forget to replace the placeholder DatabaseName with your own database name value):

11.8.13

Supporting themes in Visual Studio plug-ins

We have developed a Visual Studio plug-in to our customer (CloudShare). The plug-in is a tool window that enables managing CloudShare environments from within Visual Studio (CloudShare on Visual Studio Gallery).

During the tests we've noticed that our tool window does not change colors when applying a different theme. Searching the web we only found out some references to how you can use resource keys from the Shell assembly like this one: How can I find out when Visual Studio theme color changes?
To enable themes in your code you need to add reference to Shell assembly in your xaml:
xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.12.0"
After that you can use the colors in your xaml like this:
<Setter Property="Background" Value="{DynamicResource {x:Static vsfx:VsBrushes.MenuKey}}"/>

You can take a look at the MSDN article that describes the VsBrushes class.

The problem was you cannot actually understand which resource key to use when you look at the VsBrushes class.
To make it easier to identify the colors we have developed a Visual Studio plug-in that shows the actual colors of each key for the selected theme. This helps you with identifying the key for the current theme and apply them to your xaml.
You can also filter the list using RGB values. Print screen and paste into Paint. In Paint use the "Colour Picker" tool to select the relevant color and then open the "Edit Colours" window to find our what are the RGB values. After that use the filter in the tool window to see the relevant keys.

Plug-in on CodePlex: https://vsthemecolorsviewer.codeplex.com/.
Download on Visual Studio Gallery:
2012, 2013.


We hope you will this useful.