-
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
NullReferenceException after upgrading from 1.2.1 -> 2.3.1 #22710
Comments
How is your |
I have the same issue with 2.4.0. I'm using the default roslyn/src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs Lines 23 to 26 in ab56a4a
roslyn/src/Workspaces/Core/Portable/CodeFixes/FixAllOccurrences/BatchFixAllProvider.cs Line 319 in ab56a4a
Changing the line to the following allows tests to run normally: var differenceService = oldSolution.Workspace.Services.GetService<IDocumentTextDifferencingService>() ?? new DefaultDocumentTextDifferencingService(); I'm not completely certain, but it appears that if a workspace has no |
I have the same issue with 2.6.1. As long as there's only one Diagnostic provided, the code fix is being applied with no error, but as soon as the It seems the roslyn/src/Workspaces/Core/Portable/LinkedFileDiffMerging/LinkedFileDiffMergingSession.cs Line 89 in 542daef
If you are okay with this proposed behavior I can submit the PR to fix it. |
This has been fixed by #23492 |
This was fixed. CLosing out. |
Version 2.3.1:
Steps to Reproduce:
Expected Behavior:
All tests passed when using 1.2.1
Actual Behavior:
Debugged it and
oldSolution.Workspace.Services.GetService<IDocumentTextDifferencingService>()
returns null now. http://source.roslyn.io/#Microsoft.CodeAnalysis.Workspaces/CodeFixes/FixAllOccurrences/BatchFixAllProvider.cs,320Not unlikely that something is wrong in the test fixture but something changed between versions.
The text was updated successfully, but these errors were encountered: