News

Visual Studio Code Gears Up for Blazor

Microsoft is preparing its open source Visual Studio Code editor to support Blazor, the company's experimental technology for using languages such as C# for Web programming, which is currently dominated by JavaScript.

The promise of such a capability is creating a lot of buzz because Web coding using languages other than JavaScript would open up huge opportunities for .NET-centric and other developers.

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 at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube