StackOverflowException
See original GitHub issueI have TypeGen 2.1.1 package installed and am using version 2.1.1 of the CLI.
I created the GenerationSpec below and added it to the root of my project.
public class MyGenerationSpec : GenerationSpec
{
public MyGenerationSpec()
{
AddEnum<FarmDTOs.Loss.Causes>();
}
}
FarmDTOs.Loss.Causes is an enum inside of a class which resides in a Nuget package:
namespace FarmDTOs
{
public class Loss
{
public string Id;
public DateTime Date;
public Causes Cause;
public int Amount;
public Loss();
public enum Causes
{
Unspecified = 0,
Earthquake = 1,
Fire = 2,
}
}
}
When I run dotnet typegen generate
I get the following messages:
Generating files for project "."...
Process is terminating due to StackOverflowException.
Any ideas as to what would be causing this?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
StackOverflowException Class (System)
StackOverflowException is thrown for execution stack overflow errors, typically in case of a very deep or unbounded recursion. So make sure your code ......
Read more >How do I prevent and/or handle a StackOverflowException?
Stack overflows happen because the data on the stack exceeds a certain limit (in bytes). The details of how this detection works can...
Read more >Guiide to C# StackOverflowException
The program encounters a StackOverflowException when there is a situation where multiple methods are called in a nested manner, resulting in ...
Read more >C# StackOverflowException
The stack has limited memory. It can overflow. Typically the StackOverflowException is triggered by a recursive method that creates a deep call ...
Read more >Type: System.StackOverflowException
StackOverflowException is thrown for execution stack overflow errors, typically in case of a very deep or unbounded recursion. The OpCodes.Localloc Microsoft ...
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
Turned out this error was due to a typo I made (facepalm)! I’ve uploaded TypeGen 2.1.2 and this should be fixed.
Awesome. Thanks for the fix and info.