Prabir's Blog

where the tech matters...

My Dark Visual Studio Theme - Update

November 17
by prabir 17. November 2009 19:03

Some of you must have already tried my Dark Visual Studio Theme from http://blog.prabir.me/post/My-Visual-Studio-Theme.aspx as seen below.

dark visual studio theme

But as I upgraded to Visual Studio 2010, some of the colors didn’t seem to go well with the new WPF editor.

image

As you can see above, you cannot read the text at all, and its too bright which breaks the total aim of the theme. I have upgraded the theme to have better support in VS2010. Tweaked a bit of settings to suit VS2010.

Now the fixed one would look like this.

image

There are others changes also especially to the .aspx pages. When you upgrade my VS2008 settings in 2010 it would be displayed as below. The <% %> colors are unreadable. The same with JavaScript keywords (function…) and strings. And for some reasons, the HTML attribute the appears in red which it should not had been as shows below. (for some reason VS2010 didn’t upgrade this particular setting – HTML attribute name color)

image

Now that I have fixed, it is more pleasant as you can see the updated version below.

image

Now its better. I had to make some changes like the keyword to green which is the same as in C#, because the blue as in VS2008 didn’t seem to work at all. It was too blurry. The same with strings – defaulted to C# type coloring. I hope the C# type coloring in JavaScript will help you get familiar more easily.

Any other stuffs I forgot to update, please leave a comment below.

Read my original article on the dark theme on why you should shift @ http://blog.prabir.me/post/My-Visual-Studio-Theme.aspx

Note: The font used is Consolas which comes preinstalled with Windows Vista and up. But incase you want to use it for your Windows XP, Windows Server 2003 or others you can either download from below or from the official Microsoft link over here. 

Click here to download the theme

Prabir.vssettings (209.98 kb) [For VS2010] [Downloads: 553] (Right click and Save Target As ...)

CurrentSettings.vssettings [For VS2008](252.68 kb) [Downloads: 1363] (Right Click and Save Target As ...)

Consolas Font Pack for Microsoft Visual Studio 2005 or 2008.exe (4.33 mb) [Downloads: 896]

This same theme for Eclipse IDE can be downloaded from http://blog.prabir.me/post/Dark-Eclipse-Theme.aspx.

[UPDATE]

Due to the popularity. I moved moved the themes to be in source control, which can be found at http://gitorious.org/themes. If any one of you would like to contribute your own theme or extend my dark theme please post it in the comment below. My dark themes for various IDEs and text editors can be download from http://www.ohloh.net/p/themes/download

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: ,

Visual Studio

Downgrading VS2010 solutions to VS2008

November 05
by prabir 5. November 2009 11:27

Visual Studio 2010 has been my default IDE now. It has a bunch of cool features to work with. But unfortunately some of my colleagues are not comfortable in migrating to VS2010 as it is in beta stages or either they don’t want to have 2 instances of VS installation which takes up their storage.

But I couldn’t just leave VS2010. Not only because of its new features but also due to the fact that it has to be the default IDE later on anyways and VS team needs to find as much bugs and errors and fix them all by the time it RTMs. (VSTeam actually really does listen to your feedback. They fixed all my 10 bugs I reported in VS2010 Beta 1. So for the betterment I would like you to try updating to VS2010 and find as much bug as you can and send them feedbacks.)

Now lets get to the real thing of downgrading. I will not be explaining on how to upgrade from VS2008 to VS2010, because it already does automatically. But I will rather be going through on how to do the opposite.

1. Make a backup copy of your .sln file. It will result in two solutions. One for VS2010 and the other for VS2008. The .csproj files doesn’t need to be modified at all.

2. Open one of the .sln file in a text editor (notepad is more than fine).

image

 

You will see somewhat like the above in the selected text, where version is 11.00 and visual studio version is 2010.

3. Edit the version numbers. Now change it 11.00 to 10.00 and 2010 to 2008.

image

 

Then save it. Rename your solution files to solutionname-2008.sln and solutionname-2010.sln or something like that if you want.

Now you can open it in older version’s of Visual Studio.

But since my VS2010 is my default IDE, I didn’t even install VS2008 rather installed only VS2008 C# Express versions. You can open it from VS2008 C# Express Versions, but test projects will not be loaded and solution folders will not work. Besides that everything will most probably work fine.

Note: Any updates like adding new file in VS2010 or VS2008 is also maintained in both solutions, because the file structures are stored in .csproj file which is by nature VS version independent.

And since my projects are at max in .NET v3.5, it all works fine in VS2008. I did land up with some warning errors during compilation under VS2008.

Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it had ToolsVersion="3.5".

So since it goes back to 3.5 it still works fine. You can just ignore the warning.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags:

Visual Studio

Visual Studio Tips and Tricks - VIII

August 18
by prabir 18. August 2009 18:37

(This is a part of my series Visual Studio Tips and Tricks – VIII)

Have you ever been working on a visual studio project with lots of tabs open and find it difficult to navigate around even with ctrl + tab. Well I hope this tip is going to help you.

Let’s say I have a bunch of tabs opened.

image

I could use ctrl + tab (similar to alt + tab for normal windows applications) and get the following result. which would allow me to navigate with live preview.

image

Even though it still gives me a great UI, it still isn’t productive especially when you need to submit your code to boss by evening. So you are telling me there is much better solution?

Yeah and simple one. Just Ctrl + Alt + down arrow key.

image

That instruction would tell Visual Studio to show a list of open tabs. You can then use arrow keys or mouse to click on one of those files. What is more cool is that if you actually know the name of a file, you can also type it and it tries to match up with it. It doesn’t match the file name if you enter it from the middle. It has to be left to right.

If you still want another solution. You can check about my previous visual studio tips and tricks at http://blog.prabir.me/post/Visual-Studio-Tips-and-Tricks-IV.aspx.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: ,

Visual Studio

Visual Studio Tips and Tricks - VII

June 28
by prabir 28. June 2009 16:29

(This is a part of my series Visual Studio Tips and Tricks – VII)

In my previous post I had explained how to use the shortcut Alt W, L to close all open documents in Visual Studio. This post will be taking the same situation one step further.

Rather than pressing a series of keys, you will need to install the Visual Studio addin – PowerCommands. After that you can close all the documents using the normal menu style as shown below.

image 

For more articles on tips and tricks refer here. Or you can also access the page from the right menu under Page List heading.

 PowerCommandsSetup.msi (275.50 kb) [Downloads: 256]

To download the source code, you can go to the official site of PowerCommands at http://code.msdn.microsoft.com/PowerCommands.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: ,

Visual Studio

Visual Studio Tips and Tricks - VI

June 23
by prabir 23. June 2009 12:24

(This is a part of my series Visual Studio Tips and Tricks – VI)

One of the most important feature which I think is lacking in the the Visual Studio shell, is allowing us to close all documents. They do have the feature to close all other documents beside the current one, but it still doesn’t full fill all my requirements.

image

Thus it requires me to execute a series of commands to close all the open documents which is really a waste of time. In order to solve this solution you can press Alt W, L to Close All Documents.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , ,

Visual Studio

Save Team Foundation Server Password

June 14
by prabir 14. June 2009 17:02

(This is a part of my series Visual Studio Tips and Tricks – V )

Have you ever be tired of entering your password every time you access your Team Foundation Server (TFS) project. Don’t worry.There’s a way to bypass the login my storing your passwords in a secure vault.

image

For Windows 7 users:
  • Start Menu>Control Panel
  • User Accounts and Family Safety > Credential Manager
  • Add A Windows Credential>
  • Type in your internet/network address as your TFS server address, and username and password of your TFS account.
    image

For Windows Vista users:

  • Start Menu>Control Panel
  • User Accounts> Manage your Network Passwords
  • Click Add
  • Enter TFS server address
  • Enter your TFS username and password

For Windows XP users:

  • Start > Settings > Control Panel
  • User Accounts > Advanced> Manage Passwords > Add
  • Enter TFS server address
  • enter your TFS username and password.

Try it now to see if it works. It works with codeplex accounts too.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , ,

Visual Studio

Visual Studio 2010 Beta 1 - Theme Patch

May 29
by prabir 29. May 2009 23:13

For those of you who have read my previous blog on My Visual Studio Theme (Dark Visual Studio Theme) or change the theme of Visual Studio 2010 Beta 1 you must have realized that the background doesn’t change to black after restarting Visual Studio. I had earlier  reported this bug to Microsoft. Today I got an email (contents below) saying that they have fixed this and can be downloaded using Extension Manager or from Microsoft Visual Studio Gallery website.

You can download the path form ...

BackgroundPatchExtension.zip (23.71 kb) [Downloads: 449]

The Email:

Thank you for reporting this bug. We didn't discover it in time to fix it for Beta1, but you should see it fixed for the next release of VS 2010.

For now, there is an extension written by a member of the VS Editor team as a patch that will allow custom background colors to persist. You can find it in VS by going to Tools->Extension Manager and searching for the "BackgroundPatchExtension," or download it from a web browser at this link: http://visualstudiogallery.msdn.microsoft.com/en-us/d53e0db3-6c41-4cf5-8ca1-339aeef1ac30. Once you install it, just make sure it is enabled in the Extension Manager, and your background color should be applied correctly.

Thanks again for trying VS 2010 and sending your feedback!

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: ,

Visual Studio

5 year old and Visual Studio

May 28
by prabir 28. May 2009 00:05

While surfing through YouTube about Visual Studio 2010 I stumbled upon this hilarious video. See the video to check whether the 5 year old girl is smarter than you.

Love the video? Want to put it for future reference. Click below to download.

5_year_old_and_visual_studio (low quality - flv) [Downloads: 149]
5_year_old_and_visual_studio (high quality - mp4) [Downloads: 337]

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: ,

Visual Studio

Custom web.config Intellisense

May 27
by prabir 27. May 2009 01:28

(This is a part of my series Visual Studio Tips and Tricks – III )

Intellisense ExampleThere are at times when you would like to have intellisense support for you custom providers like the ones Microsoft provides.

In this post, I will be guiding you on the way how to create a basic intellisense for your BlogEngine.NET provider model for web.config.

You can open your BlogEngine.NET sourcecode or any of your websites to try it. But in this tutorial I will be sticking with BlogEngine.NET source code.

  1. To make stuffs clean I like to put all my Intellisense files (XSD schemas) in a folder called schemas. Please go ahead and create the folder. Add a new image item to your schemas folder. You can name it anything. Out here for simplicity I will name it blogengine.xsd.
  2. Change the target namespace to something meaning full. I prefer to have it like http://schemas.[company name]/product/year/month but its your choice. For now lets stick to http://schemas.prabir.me/blogengine/2009/5.
  3. Lets first have a look at our web.config file, and try to understand the schema.
<BlogEngine>
    <blogProvider defaultProvider="XmlBlogProvider">
        <providers>
  <add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider, BlogEngine.Core"/>
  <add name="DbBlogProvider" type="BlogEngine.Core.Providers.DbBlogProvider, BlogEngine.Core" connectionStringName="BlogEngine"/>
        </providers>
    </blogProvider>
</BlogEngine>
  1. I will not be teaching you how to write XSD schemas. There is a good article at W3schools out here where you can learn more. For now just paste the code to your xsd schema file you created earlier. (Just looking at my code you can already learn a lot about xsd schemas – I would recommend you to download the code files at the end of the article for better formatting and readability).
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="blogengine"
targetNamespace=
"http://schemas.prabir.me/blogengine/2009/5"
elementFormDefault="qualified"
xmlns="http://tempuri.org/blogengine.xsd"
xmlns:mstns="http://tempuri.org/blogengine.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
<xs:element name="BlogEngine">
<xs:complexType>
<xs:sequence>
<xs:element name="blogProvider" minOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="providers" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="add" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="type" type="xs:string" use="required" />

<xs:attribute name="connectionStringName" type="xs:string" use="optional" />

</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="defaultProvider" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
  1. Finally to make your schema work, you will have to add the xmlns attribute to your web.config file which looks like below.
<BlogEngine xmlns="http://schemas.prabir.me/blogengine/2009/5">

custom_webconfig_intellisense.zip (3.65 kb) [Downloads: 203]

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: ,

BlogEngine.NET | Visual Studio

Download MS products for Free

May 26
by prabir 26. May 2009 01:27

Good news isn’t it. Microsoft has been committed to designers and developers on providing free access to their Expression Studio, Visual Studio Products, Sql Server (Not talking about express edition) and even Windows Server.

Here’s the list of products they provide to you (students). Isn’t it just wonderful?

image

It had been doing this for students for quite a long time, but now Microsoft hasn’t forgot about their companies in which they get jobs.

Well there are certain criteria to get them.

  1. Company, less than 3 years old making less than  One Million US Dollar.(http://www.microsoft.com/BizSpark)

If you enjoyed this post, make sure you subscribe to my RSS feed!