Skip to content

Commit 1fc45cb

Browse files
committed
Clarify behavior of FSharpAnalyzerAfterBuild target regarding incremental builds
1 parent 1e313f6 commit 1fc45cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/content/getting-started/MSBuild.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ This is reusing the [Roslyn Analyzers variables](https://learn.microsoft.com/en-
213213

214214
This will run after the `CoreCompile` [target](https://github.com/dotnet/fsharp/blob/dd929579fc275ab99fd496da34bbe6bdade73c86/src/FSharp.Build/Microsoft.FSharp.Targets#L279-L280), which is the default target for building F# projects. The benefit of running after the `CoreCompile` target is this will speed up the analyzers execution as it will attempt to re-use the F# Compiler command line args `FscCommandLineArgs` property to run the analyzers without requiring a [design-time build](https://github.com/dotnet/project-system/blob/main/docs/design-time-builds.md).
215215

216-
However, this target might be skipped if the project is not built again due to [incremental builds](https://learn.microsoft.com/en-us/visualstudio/msbuild/incremental-builds?view=vs-2022). If you want to run the analyzers after every build, you can set `FSharpAnalyzers_AlwaysRunAfterBuild` to `true`:
216+
However, the `FSharpAnalyzerAfterBuild` target might be skipped if the `CoreCompile` target is not run due to [incremental builds](https://learn.microsoft.com/en-us/visualstudio/msbuild/incremental-builds?view=vs-2022). If you want to run the analyzers after every build, you can set `FSharpAnalyzers_AlwaysRunAfterBuild` to `true`:
217217

218218
```xml
219219
<PropertyGroup>

0 commit comments

Comments
 (0)