The ConcurrencyAnalyzers.NET performs analysis of concurrency-related code for target C# applications. It consists of a runtime library and a Roslyn Analyzer project that is capable to perform compilation-time transformations (thanks to project Metalama.Compiler). The Roslyn Analyzer project performs instrumentation of target application that is then analyzed during execution by the runtime library.
Warning
This project is experimental proof-of-concept. It is not tested in real applications yet. A lot of things are subject to change.
To build the project, execute the standard dotnet build
command on the whole solution.
dotnet build src/ConcurrencyAnalyzers.NET.sln
- Add the following references to the projects that you want to analyze:
<ItemGroup>
<ProjectReference Include="..\<your-path-to>\Concurrency.Analyzers.NET.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false" />
<ProjectReference Include="..\<your-path-to>\Concurrency.Analyzers.NET.Runtime.csproj" />
<PackageReference Include="Metalama.Compiler" Version="2024.0.8" PrivateAssets="all" />
</ItemGroup>
- Optional: if you want to inspect instrumented code or need debugging support, you can use define the following MSBuild properties:
<PropertyGroup>
<MetalamaDebugTransformedCode>true</MetalamaDebugTransformedCode>
<MetalamaEmitCompilerTransformedFiles>true</MetalamaEmitCompilerTransformedFiles>
</PropertyGroup>
-
Build the application.
-
Run your application. Analysis will be performed during the execution automatically.
Note: NuGet packages for the analyzers are not published yet.
This project is licensed under the Apache-2.0 license.