Edit

Share via


Durable Functions Rosyln Analyzer (C# only)

The Durable Functions Roslyn Analyzer is a live code analyzer that guides C# users to adhere to Durable Functions specific code constraints. This analyzer is enabled by default to check your Durable Functions code and generate warnings and errors when there's any.

.NET isolated analyzer

Find information (improvements, releases, bug fixes, etc.) about the Roslyn Analyzer for the NET isolated model on the durabletask-dotnet release notes page.

A list of shipped analyzer rules can be found in the analyzer release notes.

Note

The .NET Isolated Roslyn Analyzer is only available starting from Microsoft.Azure.Functions.Worker.Extensions.DurableTask v1.6.0.

.NET in-process analyzer

Information regarding the Roslyn Analyzer for the in-process model can be found on the Analyzer v0.2.0 release page.

The following sections provide configuration instructions for more detailed analysis when using the .NET in-process analyzer.

Visual Studio

For the best experience, you'll want to enable full solution analysis in your Visual Studio settings. This can be done by going to Tools -> Options -> Text Editor -> C# -> Advanced -> "Entire solution":

Screenshot of configuring Roslyn Analyzer in Visual Studio.

Depending on the version of Visual Studio, you may also see "Enable full solution analysis":

Screenshot of configuring Roslyn Analyzer in another version of Visual Studio.

To disable the analyzer, refer to these instructions.

Visual Studio Code

Open Settings by clicking the wheel icon on the lower left corner, then search for “rosyln”. “Enable Rosyln Analyzers” should show up as one of the results. Check the enable support box.

Screenshot of configuring Roslyn Analyzer in Visual Studio Code. ::: zone-end