如何在 visual studio 2010 中创建一个 cshtml 文件,MVC2 与 dot net 框架 4.0?

How to create a cshtml file in visual studio 2010 , MVC2 with dot net framework 4.0?

我使用 visual studio 2010.Is 可以从视图创建 cshtml 文件,因为在我安装的版本中我只能创建 aspx 文件。 请指导我。

由于 cshtml 只是文本文件,您始终可以更改扩展名 =)

View foulder 中右键单击新文件(任何类型,您可以只创建 cs 文件)-> 重命名 -> 设置 .cshtml 扩展名。