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 for Converge360.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube