Yes, you can. Take a look at the following post: Compile your asp.net mvc Razor views into a seperate dll
It's a "step-by-step" guide on how to compile your razor views into a separate dll. I don't know if that's what you aim to do but it'll definitely get you in the right direction.