Try to fix the analyzer path when loading in OOP#55425
Merged
genlu merged 2 commits intodotnet:main-vs-depsfrom Aug 6, 2021
Merged
Try to fix the analyzer path when loading in OOP#55425genlu merged 2 commits intodotnet:main-vs-depsfrom
genlu merged 2 commits intodotnet:main-vs-depsfrom
Conversation
sharwell
reviewed
Aug 6, 2021
src/Workspaces/Remote/ServiceHub/Host/RemoteAnalyzerAssemblyLoaderService.cs
Outdated
Show resolved
Hide resolved
This is a hack to temporarily unblock further investigations
b7d7292 to
4212271
Compare
tmat
reviewed
Aug 6, 2021
| protected override Assembly LoadImpl(string fullPath) | ||
| => base.LoadImpl(FixPath(fullPath)); | ||
|
|
||
| public RemoteAnalyzerAssemblyLoader(string? baseDirectory) |
Member
Author
There was a problem hiding this comment.
It shouldn't. I was mulling over whether to set it to null when not targeting .netcore (to avoid these file path operations)
tmat
reviewed
Aug 6, 2021
| var assemblyName = Path.GetFileName(fullPath); | ||
| var fixedPath = Path.GetFullPath(Path.Combine(_baseDirectory, assemblyName)); | ||
|
|
||
| if (!PathUtilities.PathsEqual(fixedPath, Path.GetFullPath(fullPath)) && File.Exists(fixedPath)) |
Member
Member
Author
There was a problem hiding this comment.
yes, this is just to short circuit the FileExists call. Probabaly doesn't matter at all, I can remove it
Member
There was a problem hiding this comment.
Since the assembly is gonna be read from disk anyways I don't think avoiding File.Exists has any benefit
Member
|
@genlu Just noticed - why main-vs-deps and not main? |
Member
Author
|
@tmat All the core host related stuff is still not merged back in main yet (we missed the preview 2 cut). While this would work just fine in main, I thought it'd be better to target this with other related changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixed the error described in #46687