• J
    Prevent trying to convert metadata references into circular project references · 886b7f51
    Jason Malinowski 提交于
    If you have two projects that reference each other with metadata
    references, we should avoid converting both of them into project
    references as that causes a circularity in the Workspace layer.
    The workspace API correctly throws exceptions if you try to do this,
    but the Visual Studio project system layer wasn't checking, and so it'd
    call into the Workspace APIs and throw exceptions. Unfortunately this
    often resulted in us getting into corrupted states where the data
    structures got out of sync, which might later result in other exceptions
    too.
    
    This fix isn't entirely correct in that we're not going to re-convert
    the metadata reference to the project reference if something else breaks
    the circularity; that's better than crashing so this is an improvement
    either way.
    
    Fixes https://github.com/dotnet/roslyn/issues/39904
    Fixes https://github.com/dotnet/roslyn/issues/43633
    886b7f51
MetadataToProjectReferenceConversionTests.vb 17.0 KB