提交 bf32f41a 编写于 作者: H HeeJae Chang

fixed issue we found from final val build with all razor/project system/roslyn/codelens changes.

上级 7f64e524
......@@ -562,7 +562,7 @@ private DynamicFileInfo FixUpDynamicFileInfo(DynamicFileInfo fileInfo, string fi
public void RemoveDynamicSourceFile(string dynamicFilePath)
{
var provider = _sourceFiles.RemoveDynamicFile(GetDynamicFileInfoPath(dynamicFilePath));
var provider = _sourceFiles.RemoveDynamicFile(_dynamicFilePathMaps[dynamicFilePath]);
// provider is free-threaded. so fine to call Wait rather than JTF
provider.RemoveDynamicFileInfoAsync(
......@@ -571,12 +571,14 @@ public void RemoveDynamicSourceFile(string dynamicFilePath)
private void OnDynamicFileInfoUpdated(object sender, string dynamicFilePath)
{
_sourceFiles.ProcessFileChange(dynamicFilePath, GetDynamicFileInfoPath(dynamicFilePath));
}
if (!_dynamicFilePathMaps.TryGetValue(dynamicFilePath, out var fileInfoPath))
{
// given file doesn't belong to this project.
// this happen since the event this is handling is shared between all projects
return;
}
private string GetDynamicFileInfoPath(string dynamicFilePath)
{
return _dynamicFilePathMaps[dynamicFilePath];
_sourceFiles.ProcessFileChange(dynamicFilePath, fileInfoPath);
}
#endregion
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册