-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
When pasting json into a comment in C# code, an error is shown #39429
Comments
See https://github.com/dotnet/winforms-designer/issues/923#issuecomment-568132312 for a similar investigation. /cc @AArnott |
I was able to produce this error by modifying a verbatim string. I copied a line to the final line accidentally removing the ending " thus opening the string to the end of the file. Bad code that produced the error: // ... inside class inside method
mTrace.Verbose(@"
Parsed filter:
---------------------------------------
Start Time: {0}
End Time: {1}
Incident Status: {2}
Notification Status: {3}
Launched from Alert Only: {4}
---------------------------------------
result.StartTime,
result.EndTime,
result.IncidentStatus,
result.NotificationStatus,
result.LaunchedFromAlertOnly);
return result;
}
private (DateTime? StartTime, DateTime? EndTime) GetStartEndTimes(
BsonDocument filter) {
// {
// "ProviderStartTime": { "$lte": ISODate("2020-02-01T00:00:00.000Z") },
// "ProviderEndTime": { "$gte": ISODate("2020-01-15T00:00:00.000Z") }
// }
// NOTE: We need the two fields flipped so "start" is earlier than "end"
// This differs from other feeds where they keep the $gte / $lte to create a proper intersection
var now = DateTime.UtcNow;
// rest of method and class The error:
IDE information:
Traced from here to this GitHub issue. |
@tmat more OOP sync issues :( |
This issue has been moved from a ticket on Developer Community.
This just happened to me, here is what I did:
1: Create a comment section in some C# code, using /* and */
2: Within the comment section, paste some json
3: Watch it show an yellow error bar at the top with the following exception:
StreamJsonRpc.RemoteMethodNotFoundException : Unable to find method 'SynchronizeTextAsync/3' on {no object} for the following reasons: An argument was not supplied for a required parameter.
at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)
at async Microsoft.VisualStudio.LanguageServices.Remote.JsonRpcEx.InvokeAsync(<Unknown Parameters>)
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
Original Comments
Visual Studio Feedback System on 10/12/2019, 00:03 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: