Last week, the C# Dev Kit was updated with new features focused on developer workflow and productivity. Key updates include the introduction of solution-less workspace mode, .NET Aspire orchestration, and enhancements to Razor/Blazor support. Additionally, improvements have been made to debugging and testing functionalities.
As reported, one of the major updates is the introduction of the solution-less workspace mode, now available in preview. This feature eliminates the need for a solution file (.sln), allowing developers to work on C# projects without it. This change simplifies the process and reduces overhead, providing a more efficient workspace. As stated in an original blog post, the developers can activate this feature by setting the dotnet.previewSolution-freeWorkspaceMode to true.
Another notable addition is the .NET Aspire orchestration, which is also in preview. This feature allows developers to convert any solution into a .NET Aspire solution by adding the .NET Aspire App Host and Service Defaults projects. This integration aims to provide easier to run, debug, and deploy processes for existing applications.
Now, developers can easily enable the orchestration by opening the command palette, selecting .NET: Add .NET Aspire Orchestration, and configuring the appropriate projects, similar to the same process in Visual Studio.
(Source: Microsoft DevBlogs)
Regarding the Razor and Blazor developer experience, several improvements have been introduced. With a note that Hot Reload is currently in experimental mode, and it has received updates to enhance reliability, again, developers can enable this feature by setting csharp.experimental.debug.hotReload to true. As stated in the official source, the goal is to bring Hot Reload to general availability soon.
Additionally, improvements have been made to IntelliSense, focusing on the reliability of go-to definition and resolving incorrect errors in the problems pane. Now, when issues are fixed, the associated errors disappear without requiring a build.
Furthermore, the debugging capabilities of the C# Dev Kit have also seen significant improvements. Updates now allow for Blazor web page debugging and the ability to locally debug Azure Functions apps, including those within .NET Aspire applications.
Testing has been enhanced with fixes to test diffing issues and added support for call stacks in test failures. A new diagnostic level for the testing experience has also been introduced to help resolve issues more quickly. Interested developers can enable this feature by setting csharp.debug.testExplorerVerbosity to diagnostic, stating that this can help to identify and address testing problems more efficiently.
Lastly, the product team emphasized that these updates were driven by user feedback and were designed to improve both performance and reliability, stating that these changes aim to make coding in C# more efficient, enjoyable, and productive for developers using Visual Studio Code.