{"id":21822,"date":"2019-04-18T15:02:12","date_gmt":"2019-04-18T22:02:12","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/aspnet\/?p=21822"},"modified":"2019-04-18T15:02:12","modified_gmt":"2019-04-18T22:02:12","slug":"updated-razor-support-in-visual-studio-code-now-with-blazor-support","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/updated-razor-support-in-visual-studio-code-now-with-blazor-support\/","title":{"rendered":"Updated Razor support in Visual Studio Code, now with Blazor support"},"content":{"rendered":"<p>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.<\/p>\n<h2>Get Started<\/h2>\n<p>To use this preview of Razor support in Visual Studio Code install the following:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.microsoft.com\/net\/download\">.NET Core SDK<\/a><\/li>\n<li><a href=\"https:\/\/code.visualstudio.com\/\">Visual Studio Code<\/a><\/li>\n<li><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.csharp\">C# extension<\/a><\/li>\n<\/ul>\n<p>To try out Visual Studio Code with <a href=\"https:\/\/blazor.net\">Blazor<\/a> apps, also install:<\/p>\n<ul>\n<li><a href=\"https:\/\/aka.ms\/netcore3download\">.NET Core 3.0<\/a> (Preview 4 or later)<\/li>\n<li>\n<p>The latest Blazor CLI templates:<\/p>\n<pre><code>dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview4-19216-03\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<h2>What&#8217;s new in this release?<\/h2>\n<h3>Improved diagnostics<\/h3>\n<p>We&#8217;ve improved the Razor diagnostics in Visual Studio Code for a variety of scenarios, including floating <code>@<\/code> characters:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2019\/04\/floating-at.png\" alt=\"Floating @ character\" \/><\/p>\n<p>Missing end braces:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2019\/04\/missing-end-brace.png\" alt=\"Missing end brace\" \/><\/p>\n<p>And missing end tags in code blocks:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2019\/04\/missing-end-tag.png\" alt=\"Missing end tag\" \/><\/p>\n<h3>Tag helpers<\/h3>\n<p>Tag helper completions are now supported in ASP.NET Core projects:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2019\/04\/tag-helper-completions.gif\" alt=\"Tag helper completion\" \/><\/p>\n<p>As well as completions for tag helper attribute names and values:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2019\/04\/tag-helper-attribute-completions.gif\" alt=\"Tag helper attribute completion\" \/><\/p>\n<h3>Blazor<\/h3>\n<p>Visual Studio Code now works with <a href=\"https:\/\/blazor.net\">Blazor<\/a> apps too!<\/p>\n<p>You get completions for components and component parameters:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2019\/04\/component-completions.gif\" alt=\"Component completions\" \/><\/p>\n<p>Also data-binding, event handlers and lots of other Blazor goodies!<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2019\/04\/todos-vscode.gif\" alt=\"Blazor todos\" \/><\/p>\n<h2>Limitations and known issues<\/h2>\n<p>This is an alpha release of the Razor tooling for Visual Studio Code, so there are a number of limitations and known issues:<\/p>\n<ul>\n<li>Razor editing is currently only supported in ASP.NET Core and Blazor projects (no support for ASP.NET projects)<\/li>\n<li>Limited support for colorization<\/li>\n<\/ul>\n<p>Note that if you need to disable the Razor tooling:<\/p>\n<ul>\n<li>Open the Visual Studio Code User Settings: <em>File<\/em> -&gt; <em>Preferences<\/em> -&gt; <em>Settings<\/em><\/li>\n<li>Search for &#8220;razor&#8221;<\/li>\n<li>Check the &#8220;Razor: Disabled&#8221; checkbox<\/li>\n<\/ul>\n<h2>Feedback<\/h2>\n<p>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 <a href=\"https:\/\/github.com\/aspnet\/Razor.VSCode\">Razor.VSCode<\/a> repo. When reporting Razor tooling related issues please use the &#8220;Report a Razor Issue&#8221; command in Visual Studio Code to capture all of the relevant longs and diagnostic information. Just run the command and then follow the instructions.<\/p>\n<p>Thanks for trying out Razor in Visual Studio Code!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.<\/p>\n","protected":false},"author":417,"featured_media":21406,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[196,197,7509,7251],"tags":[9,32,997,70,71],"class_list":["post-21822","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet-core","category-aspnet","category-aspnetcore","category-blazor","tag-net-core","tag-asp-net-core","tag-entity-frame","tag-entity-framework","tag-entity-framework-core"],"acf":[],"blog_post_summary":"<p>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.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/21822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/417"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=21822"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/21822\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/21406"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=21822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=21822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=21822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}