FSharpLint.MSBuild on .NET Core results in StackOverflowException
See original GitHub issueDescription
When adding FSharpLint.MSBuild to a F# .NET Core project, building the project results in a StackOverflowException
Repro steps
Please provide the steps required to reproduce the problem
-
Open Visual Studio 2017
-
File -> New Project -> Visual F# -> .NET Core -> Class Library (.NET Core)
-
Add
FSharpLint.MSBuild
NuGet package version0.9.0
. -
Try building the project.
Expected behavior
The build succeeds and the project is linted correctly.
Actual behavior
The build fails with an error:
Severity Code Description Project File Line Suppression State
Error Exception: Lint failed while analysing D:\Users\Erik\Documents\Persoonlijk\Programmeren\playground\FSharp\ClassLibrary1\ClassLibrary1.fsproj.
Failed with: error parsing ProjectCrackerTool output, stdoutput was:
stderr was:
Process is terminated due to StackOverflowException.
Stack trace: at Microsoft.FSharp.Compiler.SourceCodeServices.ProjectCracker.GetProjectOptionsFromProjectFileLogged(String projectFileName, FSharpOption`1 properties, FSharpOption`1 loadedTimeStamp, FSharpOption`1 enableLogging)
at FSharpLint.Application.Lint.getProjectFileInfo(String projectFilePath)
at FSharpLint.Application.Lint.lintProject(OptionalLintParameters optionalParams, String projectFilePath, FSharpOption`1 progress)
at FSharpLint.Application.FSharpLintWorker.RunLint(String projectFile, OptionalLintParameters options, FSharpOption`1 progress)
at FSharpLint.MSBuild.AppDomain.LintRunner.Lint(String projectFile)
at FSharpLint.MSBuild.AppDomain.LintRunner.Lint(String projectFile)
at FSharpLint.MSBuild.Proxy.Lint()
at FSharpLint.MSBuild.FSharpLintTask.Execute()
ClassLibrary1 D:\Users\Erik\Documents\Persoonlijk\Programmeren\playground\FSharp\ClassLibrary1\ClassLibrary1.fsproj 1
Known workarounds
None
Related information
- Operating system: Windows 10
- Branch: version 0.9.0
- .NET Runtime: CoreCLR
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
StackOverflowException on build in VS2017/2019
I believe it's a known Roslyn bug when chaining many fluent calls together: https://github.com/dotnet/roslyn/issues/9795.
Read more >Debugging StackOverflow errors
In this article ... A StackOverflowException is thrown when the execution stack overflows because it contains too many nested method calls.
Read more >StackOverflow exception on dotnet.exe on .Net Core - JSON
This StackOverflow exception occurs when a response is written to the stream. The bottom part of the stack strace: … ServiceStack.Text.Common.
Read more >StackOverflow error running analysis [Re-titled from " ...
Getting the following errors: CompilerServer: server failed - server rejected the request due to analyzer / generator issues.
Read more >.NET Exception Handling - System.StackOverflowException
A detailed look at the System.StackOverflowException in .NET, along with an infinite recursion example which includes C# code.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have updated my .NET Core SDK to 2.1.104, and my previous error has been replaced by a new one (the same as @richardjharding):
Thanks for raising this, and sorry for the very delayed response! The MSBuild task has been deprecated, the linter is now best run as dotnet tool or via Ionide