Skip to main content

Ensure csproj attestation

OpenRewrite.CSharp.Recipes.EnsureCsprojAttestation

Re-runs dotnet restore against each .csproj whose MSBuildProject marker is stale (set by any csproj-mutating recipe in the run) and refreshes the marker from the resulting project.assets.json. Use this at the end of a composite recipe whose csproj-mutating sub-recipes have RegenerateMarker = false, so reattestation happens once on the final consistent state instead of after every edit. Unmodified .csproj files incur no dotnet restore cost.

Recipe source

This recipe is only available to users of Moderne.

This recipe is available under the Moderne Proprietary License.

Used by

This recipe is used as part of the following composite recipes:

Usage

In order to run C# recipes, you will need to use the Moderne CLI.

Once the CLI is installed, you can install this C# recipe package by running the following command:

Install the recipe package
mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality

Then, you can run the recipe via:

Run the recipe
mod run . --recipe OpenRewrite.CSharp.Recipes.EnsureCsprojAttestation