Monthly Archives: March 2015

Razor Generator – Generated class name is different than file name

I’ve been using Razor Templates to generate text blobs. For some reason, my razor templates stopped generating namespaces based on the file path and added underscores into the class name. I did the following to fix this issue.

Add this to the top of the cshtml file:

GeneratePrettyNames: true
GenerateAbsolutePathLinePragmas: true

So the top of the file might look similar to this declaration:

@* Generator : Template TypeVisibility : Internal GeneratePrettyNames: true
    GenerateAbsolutePathLinePragmas: true *@

Reference:  Codeplex Link

Visual Studio Will Not Start

After installing an extension, I sometimes get the following error

A problem occurred when loading the Microsoft Visual Studio menu. To fix this problem, run 'devenv.exe /resetsettings' from the command prompt. Note: this command resets your environment settings.

Open up Developer Command Prompt and try the following:

devenv /setup

and then start Visual Studio. If you still get an error, try starting it from the Administrator Command Prompt with the command



Reference: Stackoverflow