-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet EOL warning suppression #70
Conversation
Adding a property to the dotnet run process that will suppress EOL Framework warnings based on the bool from the config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase this branch to the current master
that has automated tests.
@svenheden and/or @SafeerH. |
Yes that sounds like a good idea. I can't think of a scenario where you'd want to show that EOL error causing the JSON to be corrupted. |
amended variable name and format for if check
amended variable name
The root cause for the problem is the way of extracting the JSON from the console output. UPDATE: |
Hi @CharlieSaunders. Thanks for your help. |
Adding a property to the dotnet run process that will suppress EOL Framework warnings based on the bool from the config.
When using the package on older frameworks, the dotnet run process; rightly, displays that the framework being used has reached EOL. This however means that the JSON generated is invalid as it contains warnings IE:
C:\dotnet\sdk\7.0.202\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp2.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [C:\path\to\the\node_modules\csharp-models-to-typescript\lib\csharp-models-to-json\csharp-models-to-json.csproj]
[{foo:bar}]
Which when ran through JSON.parse; index.js: 70, errors with "Unexpected token C in JSON at position 0".
Adding this additional parameter on the config; suppressEolFrameworkErrors, suppresses those EOL warnings and only the generated JSON is sent for parsing.