Visual Studio 2008 Tip: Resolving Namespaces and Removing Unused Using Statements

For hardcore ReSharper users, you can do lots of amazing work with this tool like resolving namespaces, removing unused using statements and ordering them and so on. However, sometimes, when you don’t work on your own machine, you definitely will met with the situation that ReSharper doesn’t appear at that place. You will be very uncomfortable cause you have got used to those features.

Well, VS 2008 does offer these features out-of-the-box! Check it out by the following link.

Visual Studio 2008 Tip: Resolving Namespaces and Removing Unused Using Statements

Visual Studio 2008 Tip: Resolving Namespaces and Removing Unused Using Statements

Hibernate In Action

Hibernate In Action is simply one word that incredible.

I have spent a lot of time on NHibernate study before I started to read this book. A lot of blog posts, articles, and even so much time on the help document of NHibernate. However, to be honest, I have never felt like I have mastered this technology. E.g., the entity type and the value type, oh my god, I did not truly understand these things until I read Hibernate In Action.

The .NET port of this book, NHibernate In Action is also on its way to be released. I’m looking forward its coming. I strongly recommend that you should read these two books if you want to learn this incredible ORM technology.

Hope this helps,

Jack Ma

Hibernate In Action

Unicode in Visual Studio

Sometimes people ask me how to let the Visual Studio remember the default text encoding when creating new file or adding new item to the projects. At first, I don’t know. VS always use the system default codepage settings for the new created files/items. After I met with this blog post, I finally got an answer for this question. Check it out!

ASP.NET Resources – Unicode in Visual Studio.NET 2003

If you don’t wanna read through this long post, I pull out the key section for you.

/! TO ALL THOSE ASKING HOW TO CHANGE DEFAULT ENCODING WHILE CREATING NEW FILE IN VISUAL STUDIO /!
Go to C:Program FilesMicrosoft Visual Studio .NET 2003VC#CSharpProjectItems (directory may vary depending on which VS version you have, and which project’s language you target), open the template you need to change (I needed to change JScript.js) in Visual Studio (or any other text editor I suppose?), and save it back to the encoding you want.
=> this will affect files you create while in a project, using Project > Add new item… (or right-clicking on the project tree > Add > Add new item…) (or Ctrl+Shift+A) (i think i said it all didn’t I?)
You can also go to C:Program FilesMicrosoft Visual Studio .NET 2003Common7IDENewScriptItems (or NewFileItems, depends what u wanna do), and to the same (open/save with encoding).
=> this will affect files you create using File > New > File…

Unicode in Visual Studio