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:
- Migrate to .NET 10
- Migrate to .NET 5
- Migrate to .NET 6
- Migrate to .NET 7
- Migrate to .NET 8
- Migrate to .NET 9
- Migrate to .NET Core 3.0
- Migrate to .NET Core 3.1
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:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality
Then, you can run the recipe via:
mod run . --recipe OpenRewrite.CSharp.Recipes.EnsureCsprojAttestation