razor 支持es6_更新了Visual Studio Code中的Razor支持,现在具有Blazor支持

Visual Studio Code的Razor工具现在提供了改进的诊断、标签助手支持,并增加了对Blazor应用程序的兼容。此版本着重于提供组件、参数补全,以及Blazor特有的数据绑定和事件处理功能。虽然目前仅支持ASP.NET Core和Blazor项目,用户可以通过反馈帮助改进工具。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

razor 支持es6

Some days ago we announced improved Razor tooling support in Visual Studio Code with the latest C# extension. This latest release includes improved Razor diagnostics and support for tag helpers and Blazor apps.

几天前,我们宣布使用最新的C#扩展改进了Visual Studio Code中的Razor工具支持。 此最新版本包括改进的Razor诊断程序,并支持标签助手和Blazor应用程序。

Tag helper completion
This article in blog 博客中的这篇文章

开始使用 (Get Started)

To use this preview of Razor support in Visual Studio Code install the following:

要在Visual Studio Code中使用Razor支持的预览,请安装以下代码:

To try out Visual Studio Code with Blazor apps, also install:

要使用Blazor应用程序试用Visual Studio Code,还请安装:

  • .NET Core 3.0 (Preview 4 or later)

    .NET Core 3.0 (预览版4或更高版本)

  • The latest Blazor CLI templates:

    最新的Blazor CLI模板:

    dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview4-19216-03

此版本有什么新功能? (What’s new in this release?)

改进的诊断 (Improved diagnostics)

We’ve improved the Razor diagnostics in Visual Studio Code for a variety of scenarios, including floating @ characters:

我们针对各种情况改进了Visual Studio Code中的Razor诊断,包括浮动@字符:

Floating @ character

Missing end braces:

缺少大括号:

Missing end brace

And missing end tags in code blocks:

在代码块中缺少结束标记:

Missing end tag

标签助手 (Tag helpers)

Tag helper completions are now supported in ASP.NET Core projects:

ASP.NET Core项目现在支持标记帮助器完成:

Tag helper completion

As well as completions for tag helper attribute names and values:

以及标记助手属性名称和值的完成:

Tag helper attribute completion

开拓者 (Blazor)

Visual Studio Code now works with Blazorapps too!

Visual Studio Code现在也可以与Blazor应用程序一起使用!

You get completions for components and component parameters:

您将获得组件和组件参数的完成信息:

Component completions

Also data-binding, event handlers and lots of other Blazor goodies!

还有数据绑定,事件处理程序和许多其他Blazor好东西!

Blazor todos

局限性和已知问题 (Limitations and known issues)

This is an alpha release of the Razor tooling for Visual Studio Code, so there are a number of limitations and known issues:

这是Visual Studio Code的Razor工具的Alpha版本,因此存在许多限制和已知问题:

  • Razor editing is currently only supported in ASP.NET Core and Blazor projects (no support for ASP.NET projects)

    当前仅在ASP.NET Core和Blazor项目中支持Razor编辑(不支持ASP.NET项目)
  • Limited support for colorization

    对着色的支持有限

Note that if you need to disable the Razor tooling:

请注意,如果您需要禁用Razor工具:

  • Open the Visual Studio Code User Settings: File -> Preferences -> Settings

    打开Visual Studio Code用户设置:“ 文件” -> “首选项” -> “设置”

  • Search for “razor”

    搜索“剃须刀”
  • Check the “Razor: Disabled” checkbox

    选中“剃刀:已禁用”复选框

反馈 (Feedback)

Please let us know what you think about this latest update to the Razor tooling support in Visual Studio Code by reporting issues in the Razor.VSCode repo. When reporting Razor tooling related issues please use the “Report a Razor Issue” command in Visual Studio Code to capture all of the relevant longs and diagnostic information. Just run the command and then follow the instructions.

通过报告Razor.VSCode存储库中的问题,请告知我们您对Visual Studio Code中Razor工具支持的最新更新的看法 。 报告与Razor工具相关的问题时,请使用Visual Studio Code中的“报告Razor问题”命令来捕获所有相关的long和诊断信息。 只需运行命令,然后按照说明进行操作即可。

Thanks for trying out Razor in Visual Studio Code!

感谢您在Visual Studio Code中试用Razor!

Daniel Roth
丹尼尔·罗斯 (Daniel Roth)

Principal Program Manager, ASP.NET

ASP.NET首席程序经理

翻译自: https://habr.com/en/company/microsoft/blog/449674/

razor 支持es6

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值