September 2009 Entries

Create GUID tool for Visual Studio

Posted Tuesday, September 29, 2009 9:32 PM | Feedback (11), Filed Under .NET developement Visual Studio

@rewdboy a coworker had a small problem earlier today, he just couldn't find the good old Create GUID application that is packaged with Visual Studio.

The tool has not been removed from the IDE it’s still there. It depends on what development type you have chosen. You may remember the first time you start Visual Studio after installing it prompts you asking what type of development you are planning to do. There are six choices, the one that I know has the Create GUID tool is the Visual C"# Development Settings, If you went with Web Development Settings you are missing this feature.

Import and Export Settings Wizard

There are two ways of getting hold of this nice tool. The first one is to reset all your IDE to the C# Development settings.

To do this just go to Tools -> Import and Export settings and then mark the Reset all settings radio button in the wizard after that you can chose between the settings above.

This may be ok if you have just installed Visual Studio. But if you have been working with it for some time and have customized and tweaked it to perfection you may want to go for the second approach.

And that is to just add the command button to your toolbar. This is probably the preferred way to do this. But it’s not that intuitive. Here is how:

It’s just as you normally would add a tool to the toolbox Tools –> Customize

Tools-Customize

Then we come to the not so intuitive part. The Create GUID tool is hidden as External Command 1. Just drag the control to your toolbar and voala! 
Why they have chosen to hide it this way we may never know. But now you know how to get it.

Tools Customize Commands 

Highlight current line Visual Studio custom theme

Posted Friday, September 18, 2009 4:12 PM | Feedback (5), Filed Under .NET developement Refactoring ReSharper

A nice feature of ReSharper, besides all refactoring goodness, is the ability to highlight the current line. That is the line where the caret is, is highlighted. This makes it so much easier to get back and find where you last left off or where the search result is when searching around in Visual Studio.

If you have ReSharper it’s easy to do this. Just go to ReSharper’s options menu ReSharper –> Options. And from there go to the Editor menu and select “Highlight current line”

image

If you have a customized color theme like I do, then you can change the default highlight color by going into Visual Studio’s own Options menu, Tools –> Options, and then change the Item background color for the ReSharper Current Line.

image

Here is the result for my theme.

image

By the way if you like this theme you can download it from here. It also contains the Dina font by Jørgen Ibsen. A font that is made for readability. The theme is a modded version of Oren Ellenbogen's Dark Scheme.

Enjoy!

Plans are useless, but planning is indispensable

Posted Friday, September 11, 2009 10:41 AM | Feedback (8), Filed Under developement

This is just a short post but with a big statement made by Dwight D. Eisenhower:

“I have always found that plans are useless, but planning is indispensable.”

This statement was valid in that time and is still relevant. We as developers know that there are only three things that are certain in life, death, taxes and changing requirements.

So to remind me I’ve made a small desktop background with this wise words. Grab a copy if you like it.

Plans_are_useless_thumb

Disable Development Web Server when attatching to process

Posted Tuesday, September 01, 2009 11:07 AM | Feedback (9), Filed Under .NET developement

After I reinstalled my computer to use Windows 7 my Visual Studio 2008 began to start the Cassini development server included in Visual Studio 2008.
This has been annoying me for quite some time, not that it’s any problem just that it gets started by default without me asking for it.

So I went and disabled it. I did it by formatting the ProjectName.csproj.user file. This file is meant to work as the web.config and machine.config files, where the machine.config has all settings but they are overridden by the settings that match in the web.config file, where the csproj.user being the equivalent to the web.config file. 
The way to do it It’s not that intuitive, it may be easier ways but here is a step by step of how I did it.

To do this from Visual Studio you first have to unload your project to be able to look at your project file.

UnloadProject

Then go way to the bottom of the file until you find the <WebProjectProperties> </WebProjectProperties> element. Copy the contents of it.

Open your ProjectName.csproj.user file, this is only needed if you are working in a project shared by several developers and don’t want them to get your settings also.

Paste the part that you copyed from the ProjectName.csproj file into the corresponding <WebProjectProperties> </WebProjectProperties> element. In my case it’s the

<AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
<EnableWcfTestClientForSVC>False</EnableWcfTestClientForSVC>
<UseIIS>False</UseIIS>
<AutoAssignPort>False</AutoAssignPort>
<DevelopmentServerPort></DevelopmentServerPort>
<DevelopmentServerVPath></DevelopmentServerVPath>
<IISUrl></IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>True</UseCustomServer>
<CustomServerUrl>http://localhost/</CustomServerUrl>

The part to take notice of here is the <AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>. Here you want the value to be set to False.
If that doesn’t work try setting the <UseCustomServer> to True and point at your localhost url or the path you have set as your host name.

There are other ways people have done this but from the projects property window, but that window does not have the setting for disabling the dev. server while debugging.

image