Posts in "Visual Studio" tag

Late to the Github Party and How I Got There

Posted on 1 August 2011 and tagged with , 0 comments

Right, so I was late but I am there now – in Github. I spent a few hours yesterday to setup everything and while it took a bit longer than with Subversion I still think it was easier than expected.

This post is for other Windows users who want a short overview of what you need to do to become a Githubber.

  • imageGet an account at Github.
    The reason we do this first is because Github have a really good guide for beginners. 
  • Download Git for Windows.
  • Follow the guide at Github (read both “Set Up Git” and “Create A Repo”).
  • You should now have submitted your first commit to your repo through the command line or the Git GUI. Congratulations!
  • If you’re like me, you don’t like the cmd-way (I really tried to!) and want something visually appealing instead. I found the Git Extensions project which suited me well. Besides giving you a complete overview of the repo, it also integrates with VS2010 by adding a “Git” menu. Handy!

That’s actually all I had to do. The only problem I had was with Git Extensions because it used PuTTY for SSH while the guide used OpenSSH. To fix it I had to generate a new SSH key (public and private) in PuTTY and add the public key to my Github account. Apparently PuTTY is more suited for Windows than OpenSSH is.

Git tips for Visual Studio

README
Name the README file with the “.markdown” file extension and use VS extension “Markdown Mode” to edit it.

.gitignore
Create a new file called “.gitignore” in the root of the repository and fill it will directories/files that you don’t want to stay in the repository. Following is a .gitignore file which filters Visual Studio and ReSharper files:

bin 
obj 
*.suo 
*.user 
*.csproj.user 
*.cache 
*.resharper.user 
_ReSharper* 
*.sln.docstates*

Summary

After all, Git wasn’t as scary as I had believed and the Github website makes it a really nice experience with its beautiful UI and social features.

So what are you waiting for? Go follow me on Github (or watch some interesting projects)!

Read More »

Getting HTML Colorization with Razor View Engine

Posted on 27 July 2010 and tagged with , , 0 comments

imageToday the Gu announced the first preview of ASP.NET MVC 3, which included the new Razor view engine. I’ve been really excited about it as I feel it makes our views a lot prettier than before with Web Forms view engine. It will also be a lot quicker and smoother to type without all those messy <%-characters.

To the point! I am currently upgrading an existing site to use MVC 3 and Razor. However in this first preview of MVC 3 we won’t have any File Colorization or IntelliSense in .cshtml files. This means it will look like we’re editing in Notepad. It got me wondering if there was a way to at least get some colorization, more specifically HTML colorization. I wandered around in the options of VS2010, and eventually found the place where I could map an extension to a different colorization.

This is how you get HTML colorization in .cshtml files:

  1. Open Tools menu.
  2. Choose Options…
  3. Go to Text Editor, and third choice; File Extension.
  4. Enter cshtml as Extension and choose HTML Editor in the dropdown.
  5. Click Add and OK. Now try to open a .cshtml file – you should get HTML colorization.

Remember to remove this setting when VS2010 officially gets Razor colorization and IntelliSense.

That’s it. Hopefully it will be a little bit easier on your eyes.

Read More »

My Must-Have Add-ins for Visual Studio 2008

Posted on 23 February 2010 and tagged with 0 comments

This subject is probably close to cliché but I’m doing it mostly for myself (and hoping someone else finds it interesting too), to keep a reference of my favorite add-ins so that I can find them again.

Following is the most useful add-ins for Visual Studio in no apparent order.

DPack

DPackDPack is one of the add-ins I use the most day-to-day. It allows you to use the shortcut ALT + U  to get a window where you can search for a file in the current solution and immediately given the file you were looking for – without having to wander around in the Solution Explorer.

A similar feature exists in the ReSharper add-in, with the keyboard shortcut Ctrl + Shift + T, but I think it fails on the speed and file name matching.

 DPack

VisualSVN

VisualSVN VisualSVN is an add-in that makes it easier to manage SVN repositories through the Solution Explorer in Visual Studio. You can easily see which files haven’t been committed since changed, and it automatically adds files to SVN when you add them to your project.

A trial of VisualSVN exists that lets you run it for 30 days. A license is only $49. If you are looking for a free, equivalent add-in then AnkhSVN is a good bet, but it doesn’t meet up to the stability of VisualSVN.

VisualSVN

ReSharper

ReSharper I would have been crucified if I didn’t get this on the list as it’s one of the most awesome add-in. ReSharper does so many things I can’t write them all down here. Though, in summary ReSharper helps you become a better and more productive programmer, by giving you tips and quick refactoring shortcuts. If you haven’t already got it—check it out now!

ReSharper

PowerCommands

This add-in adds a number of handy context menu items to Visual Studio. A few of the best is Collapse Projects, Copy/Paste References, Open Containing Folder, Undo Close and an enhanced Show All Files button.

PowerCommands

Auto Build Increment Addin

This add-in might not be useful for the majority of users, but it is really handy when you want to keep track of build numbers for your project. Basically what it does is increase the version number of your assembly for you, on every build. It also allows you to customize how you want to format the version string. I am using this add-in for my blog engine project to identify which version I am running.

Auto Build Increment Addin

GhostDoc

Tired of writing XML comments in your code, over and over again? This add-in automatically does that for you based on how the method is written and named. Although it doesn’t get it right all the times, it saves you time writing it all from scratch.

GhostDoc

Markdown Mode

One I haven’t tried myself, but looks very handy when dealing with markdown documents is Markdown Mode. It adds syntax highlighting and a preview window to Visual Studio 2010 when viewing .mkd files. As if that wasn’t enough it also allows you to copy the markdown code as HTML. This one I will install for sure after Visual Studio 2010 is released in April.

Markdown Mode

Do you have an add-in you just can’t live without? Please share!

Read More »

Loading Posts...