如何设置 Visual Studio 以在 (Umbraco) 项目中创建 CSHTML 文件 [英] How to set up visual studio to create CSHTML files in (Umbraco) Project

查看:83
本文介绍了如何设置 Visual Studio 以在 (Umbraco) 项目中创建 CSHTML 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我正在 Visual Studio 中为我的 Umbraco 项目开发我的 razor 宏脚本.一切正常,但有两件事真的很烦人.

So, i'm developing my razor macroscripts in Visual studio for my Umbraco project. Everything is working fine, but there are two things really annoying.

  • 如果我想创建一个新的 CSHTML 文件,最好的解决方案是复制现有文件.
  • 我没有完整的剃须刀智能感知,例如Html.Raw

有没有办法配置我的项目以使用此功能?还没有找到 .cshtml 模板.

Is there a way to configure my project to use this features? Didn't find a .cshtml template yet.

推荐答案

您需要安装 MVC 框架,然后当您将项目作为网站打开时,您应该能够创建和编辑带有语法突出显示的 cshtml 文件.有关详细信息,请参阅我对以下帖子的回答:

You need to have the MVC Framework installed, then when you open the project as a website, you should be able to create and edit cshtml files with syntax highlighting. See my answer to the following post for more details:

为 Umbraco 设置本地开发环境

这篇关于如何设置 Visual Studio 以在 (Umbraco) 项目中创建 CSHTML 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆