Defining an alias for a class with Razor

Why would you want to do that? Whatever reason you need this for, there's probably a better way. You should avoid writing C# code in a Razor view anyway, so you shouldn't need it. All you need in a Razor view is the namespace for your view model because that's all that a view should manipulate.

@model MyViewModel
...

Leave the aliases and C# code to where they belong - controllers, models, helpers, ...

All this being said, the aliases should work. For example the following view runs perfectly fine for me:

@using foo = System.IO;
<div>
    @foo.Path.GetFileName(@"c:\work\foo.txt")
</div>