提交 026dc3c8 编写于 作者: J Jason Malinowski

Fix cast exception in AbstractProject.RemoveDocument

AbstractProject.RemoveDocument was trying to support removing
ContainedDocuments, but had a misplaced cast which negated the whole
attempt.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/776782
上级 914aab16
......@@ -224,8 +224,6 @@ internal void AddDocument(IVisualStudioHostDocument document, bool isCurrentCont
[Obsolete("This is a compatibility shim for TypeScript; please do not use it.")]
internal void RemoveDocument(IVisualStudioHostDocument document)
{
var shimDocument = (DocumentProvider.ShimDocument)document;
var containedDocument = ContainedDocument.TryGetContainedDocument(document.Id);
if (containedDocument != null)
{
......@@ -234,6 +232,7 @@ internal void RemoveDocument(IVisualStudioHostDocument document)
}
else
{
var shimDocument = (DocumentProvider.ShimDocument)document;
VisualStudioProject.RemoveSourceFile(shimDocument.FilePath);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册