Visual Studio Code Gears Up for Blazor
Microsoft's efforts to gear up VS Code for Blazor start with initial support for Razor, its ASP.NET programming syntax for creating dynamic Web pages with C# or VB.NET. That markup syntax for embedding server-based code into Web pages consists of Razor markup, C# and HTML.
The company recently announced that Razor support in VS Code was available in preview, baked in to the C# for Visual Studio Code extension available in the Visual Studio Code Marketplace.
The initial support introduces functionality currently limited to offering code-completion options for HTML, C# and Razor directives in ASP.NET Core projects, along with the "red squiggles" that provide diagnostic information such as a possible problem.
Microsoft's Daniel Roth emphasized that this first alpha release for Razor tooling in VS Code comes with a number of limitations and known issues, including the lack of support for ASP.NET projects or Blazor projects.
"Even though the functionality of Razor tooling is currently pretty limited, we are shipping this preview now so that we can start collecting feedback," Roth said. Fleshing out the Razor support is a prerequisite for eventually adding Blazor support in VS Code, Roth indicated.
Ironically, the VS Code preview support for Razor -- and eventually Blazor -- was introduced shortly after client-side Blazor problems were reported by Microsoft, perhaps tempering that aforementioned Blazor buzz somewhat. Specifically, Microsoft revealed that its Blazor effort is being hampered by problems in working with WebAssembly, itself a young, experimental technology that provides the foundation of the Blazor effort with its goal of providing an assembly-like language that acts as a compilation target to enable C, C++, C# and other code to run in the browser.
Those problems prompted Microsoft to delay the client-side Blazor effort that depends so heavily upon WebAssembly, though the server side is progressing faster (under the moniker "Razor Components"), to the point where server-size Blazor is planned to be included in next year's release of .NET Core 3.0.
Meanwhile, work on Razor/Blazor support in VS Code will continue. "Next up we are working on tag helper support," Roth said of the Razor preview effort. "This will include support for tag helper completions and IntelliSense. Once we have tag helper tooling support in place we can then start work on enabling Blazor tooling support as well. Follow our progress and join in the conversation on the https://github.com/aspnet/Razor.VSCode repo."
About the Author
David Ramel is an editor and writer for Converge360.