提交 4523ddc8 编写于 作者: T Tom Meschter 提交者: GitHub

Merge pull request #20481 from tmeschter/FixGettingIVsBrowseObjectContext

Cast the correct object to IVsBrowseObjectContext
......@@ -219,7 +219,7 @@ public void AddPackageReference(string projectName, string packageName, string v
{
var project = GetProject(projectName);
if (project.Object is IVsBrowseObjectContext browseObjectContext)
if (project is IVsBrowseObjectContext browseObjectContext)
{
var packageService = browseObjectContext.ConfiguredProject.Services.PackageReferences;
......@@ -235,7 +235,7 @@ public void RemovePackageReference(string projectName, string packageName)
{
var project = GetProject(projectName);
if (project.Object is IVsBrowseObjectContext browseObjectContext)
if (project is IVsBrowseObjectContext browseObjectContext)
{
var packageService = browseObjectContext.ConfiguredProject.Services.PackageReferences;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册