question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FSharpLint.MSBuild on .NET Core results in StackOverflowException

See original GitHub issue

Description

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

  1. Open Visual Studio 2017

  2. File -> New Project -> Visual F# -> .NET Core -> Class Library (.NET Core)

  3. Add FSharpLint.MSBuild NuGet package version 0.9.0.

  4. 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:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ErikSchierboomcommented, Apr 23, 2018

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):

/Users/erikschierboom/.nuget/packages/fsharplint.msbuild/0.9.0/build/FSharpLint.MSBuild.targets(16,5): error MSB4062: The "FSharpLintTask" task could not be loaded from the assembly /Users/erikschierboom/.nuget/packages/fsharplint.msbuild/0.9.0/build/../tools/FSharpLint.MSBuild.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. [/Users/erikschierboom/Programming/exercism/fsharp/exercises/accumulate/Accumulate.fsproj]
/Users/erikschierboom/.nuget/packages/fsharplint.msbuild/0.9.0/build/FSharpLint.MSBuild.targets(16,5): error MSB4062:  Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [/Users/erikschierboom/Programming/exercism/fsharp/exercises/accumulate/Accumulate.fsproj]
0reactions
duckmattcommented, Feb 12, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found