System.InvalidOperationException: 'Could not find color or style '0'.
See original GitHub issueCaused by this
AnsiConsoleExtensions.Log($"Data[0]: {_data[0]}", "info");
basically
AnsiConsole.MarkupLine($"[white]{timeStampFull}-{severity.ToUpper()}:[/] {message} [white]...[/]");
doesn’t like the extra braces but why should that matter?
the number of opening markup tokens should matchup the number of closing tokens, if there are more then these are likely part of the message even more so if they contain no valid markup tag
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
c# - InvalidOperationException when trying to animate ...
I'm trying to programmatically trigger a color animation on a button, but getting a System.InvalidOperationException when I do. It seems it can' ......
Read more >ASP.NET 2.0: Could not find control 'CONTROLNAME' in ...
Exception Details: System.InvalidOperationException: Could not find control 'lstMakes' in ControlParameter 'MakeID'. Source Error:
Read more >Web service error codes (Microsoft Dataverse) - Power Apps
This topic lists the error codes you might encounter when you debug your code.
Read more >Dowloading/Uploading SSRS Report Error on ALL ...
anyone seen this error? Someone tried to upload a report and now we cant edit any reports (including the std reports) from report...
Read more >Unknown TlsProvider `Default (Native TLS 1.2+)` when ...
Attached project fails build on VS2022 Preview for Mac with: System.InvalidOperationException: Unknown TlsProvider `Default (Native TLS 1.2+)`
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
You’ll have to escape it with either
mystring.EscapeMarkup()
orMarkup.Escape(myString)
.See the section “Escaping format characters” at https://spectresystems.github.io/spectre.console/markup for more information.
It just occurred to me that it’s probably related to the dictionary keys and values I’m using:
Yields:
And I’ve just confirmed that
EscapeMarkup
fixes it. 😊