Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updated Razor support in Visual Studio Code, now with Blazor support

#1
Updated Razor support in Visual Studio Code, now with Blazor support

Daniel Roth

Daniel

Today we are pleased to announce 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.

Get Started


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

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

  • .NET Core 3.0 (Preview 4 or later)
  • The latest Blazor CLI templates:

    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:

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:

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 Blazor apps too!

You get completions for components and component parameters:

Component completions

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

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:

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

Note that if you need to disable the Razor tooling:

  • Open the Visual Studio Code User Settings: File -> Preferences -> Settings
  • 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.

Thanks for trying out Razor in Visual Studio Code!

Daniel Roth
Daniel Roth

Principal Program Manager, ASP.NET

Follow Daniel   

Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Unified Blazor UI in the Mobile Blazor Bindings Preview 5 xSicKxBot 0 1,914 09-09-2023, 05:09 AM
Last Post: xSicKxBot
  Hybrid Blazor apps in the Mobile Blazor Bindings July update xSicKxBot 0 1,767 09-03-2023, 09:49 AM
Last Post: xSicKxBot
  Unified Blazor UI in the Mobile Blazor Bindings Preview 5 xSicKxBot 0 2,162 10-31-2020, 07:01 PM
Last Post: xSicKxBot
  Hybrid Blazor apps in the Mobile Blazor Bindings July update xSicKxBot 0 1,991 09-10-2020, 07:29 PM
Last Post: xSicKxBot
  New experimental Razor editor for Visual Studio xSicKxBot 0 1,591 09-10-2020, 05:51 AM
Last Post: xSicKxBot
  Hybrid Blazor apps in the Mobile Blazor Bindings July update xSicKxBot 0 1,834 07-24-2020, 08:57 AM
Last Post: xSicKxBot
  New experimental Razor editor for Visual Studio xSicKxBot 0 1,643 07-17-2020, 04:41 AM
Last Post: xSicKxBot
  Configuring Azure Services and emulators using Visual Studio xSicKxBot 0 1,581 06-04-2020, 09:16 AM
Last Post: xSicKxBot
  Configuring Azure Services and emulators using Visual Studio xSicKxBot 0 1,664 05-07-2020, 11:41 PM
Last Post: xSicKxBot
  Updated Razor support in Visual Studio Code, now with Blazor support xSicKxBot 0 1,718 04-29-2019, 09:17 PM
Last Post: xSicKxBot

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016