扩展程序无法在Visual Studio 2010中卸载 [英] Extension failing to uninstall in Visual Studio 2010

查看:361
本文介绍了扩展程序无法在Visual Studio 2010中卸载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS2010中创建了一个自定义扩展.我在VS2010主配置单元中安装了它.我无法卸载它.

当我转到工具"->扩展管理器"时,它显示了此扩展名. 禁用"选项为灰色,仅激活卸载.当我单击卸载按钮时,它引发错误该文件已存在时无法创建文件".

接下来,我尝试运行"C:\ Program Files \ Microsoft Visual Studio 10.0 \ Common7 \ IDE> VSIXInstaller.exe"; /u:< GUID>安装扩展程序后,出现以下异常:



2010年9月14日12:35:49-Microsoft Visual Studio Extension安装程序
2010年9月14日12:35:50--------------------------------------- -----
2010年9月14日12:35:50-正在初始化卸载...
2010年9月14日12:35:50-找到已安装的产品-Microsoft Visual Studio 2010专业版
2010/9/14上午12:35:50-扩展详细信息...
2010/9/14上午12:35:50-   标识符:e9e257ab-a25b-4119-92a4-71d449f6bb3b
2010/9/14上午12:35:50-   名称                                        :MyExtension
2010/9/14上午12:35:50-   作者        :AuthorName
2010/9/14上午12:35:50-   版本        :1.0.0.0
2010/9/14上午12:35:50-   说明    :说明
2010/9/14上午12:35:50-   语言环境        :zh-CN
2010/9/14上午12:35:50-    MoreInfoURL     :http://www.jazz.net/
2010/9/14上午12:35:50-   已安装ByMSI :错误
2010/9/14上午12:35:50-    MinFramework    :4.0
2010/9/14上午12:35:50-    MaxFramework    :4.0
2010/9/14上午12:35:50-
2010/9/14上午12:35:50-   支持的Visual Studio版本:
2010/9/14上午12:35:50-       版本:10.0
2010/9/14上午12:35:50-           终极
2010/9/14上午12:35:50-           高级版
2010/9/14上午12:35:50-           专业版
2010/9/14上午12:35:50-
2010/9/14上午12:35:50-   受支持的隔离外壳:
2010/9/14上午12:35:50-
2010/9/14上午12:35:50-   参考书目:
2010/9/14上午12:35:50-        -------------------------------------------------- -----
2010/9/14上午12:35:50-       标识符:Microsoft.VisualStudio.MPF
2010/9/14上午12:35:50-       名称       :Visual Studio MPF
2010/9/14上午12:35:50-        MinVersion   :10.0
2010/9/14上午12:35:50-        MaxVersion   :
2010/9/14上午12:35:50-        MoreInfoURL  :
2010/9/14上午12:35:50-       嵌套:否
2010/9/14上午12:35:50-
2010/9/14上午12:35:50-
2010年9月14日12:35:50-卸载版本为1.0.0.0的'MyExtension'.
2010年9月14日12:35:50-System.IO.IOException:当该文件已经存在时,无法创建该文件.

  在Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.Uninstall(IInstalledExtension扩展)
  在VSIXInstaller.App.UninstallExtensionFromSKU(String vsixID,SupportedVSSKU sku)

 

我在注册表中搜索了所有出现的扩展名GUID,并将其删除.我还删除了在"HKLM \ Microsoft \ VisualStudio \ 10.0 \ ExtensionManager \ PendingDeletions"中标记为已删除的扩展名.在注册表中.

但是扩展名拒绝被卸载.任何帮助将不胜感激.

解决方案

我能够找到解决方案.我在某处读到,当我们尝试卸载扩展程序时,它被标记为已删除,并在以后被删除.

我在VS2010InstallDir \ Common7 \ IDE \ Extensions中安装了扩展dll和vsixmanifest文件.我在该目录中查找,已经存在标记我要删除的扩展名的文件. VS创建了2个文件"Mypackage.pkgdef.deleteme", 和"extension.vsixmanifest.deleteme";在目录中.当我尝试通过Tools-> Extension Manager或使用VSIXInstaller.exe卸载扩展程序时,VS试图创建相同的2个文件,以将其标记为已删除.所以失败了 IOException,因为文件已经存在.我不确定VS如何达到此状态,但是删除了这2个"* .deleteme"文件发挥了作用.

如果我通过在用户Appdata区域中进行复制来安装扩展程序,只需删除Appdata区域中的扩展程序文件夹即可完成这项工作.


I created a custom extension in VS2010. I have it installed in VS2010 main hive. I am having trouble uninstalling it.

When I go to Tools->Extension Manager, it shows me this extension. Option to Disable it is greyed out, only uninstall is active. When I click on uninstall button, it throws error "Can not create a file when that file already exists".

Next I tried running "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE>VSIXInstaller.exe" /u:<GUID> of installed extension, I got following exception:



9/14/2010 12:35:49 AM - Microsoft Visual Studio Extension Installer
9/14/2010 12:35:50 AM - -------------------------------------------
9/14/2010 12:35:50 AM - Initializing Uninstall...
9/14/2010 12:35:50 AM - Found installed product - Microsoft Visual Studio 2010 Professional
9/14/2010 12:35:50 AM - Extension Details...
9/14/2010 12:35:50 AM -     Identifier      : e9e257ab-a25b-4119-92a4-71d449f6bb3b
9/14/2010 12:35:50 AM -     Name            : MyExtension
9/14/2010 12:35:50 AM -     Author          : AuthorName
9/14/2010 12:35:50 AM -     Version         : 1.0.0.0
9/14/2010 12:35:50 AM -     Description     : Description
9/14/2010 12:35:50 AM -     Locale          : en-US
9/14/2010 12:35:50 AM -     MoreInfoURL     : http://www.jazz.net/
9/14/2010 12:35:50 AM -     InstalledByMSI  : False
9/14/2010 12:35:50 AM -     MinFramework    : 4.0
9/14/2010 12:35:50 AM -     MaxFramework    : 4.0
9/14/2010 12:35:50 AM -
9/14/2010 12:35:50 AM -     Supported Visual Studio Editions :
9/14/2010 12:35:50 AM -         Version : 10.0
9/14/2010 12:35:50 AM -             Ultimate
9/14/2010 12:35:50 AM -             Premium
9/14/2010 12:35:50 AM -             Pro
9/14/2010 12:35:50 AM -
9/14/2010 12:35:50 AM -     Supported Isolated Shells :
9/14/2010 12:35:50 AM -
9/14/2010 12:35:50 AM -     References      :
9/14/2010 12:35:50 AM -         -------------------------------------------------------
9/14/2010 12:35:50 AM -         Identifier   : Microsoft.VisualStudio.MPF
9/14/2010 12:35:50 AM -         Name         : Visual Studio MPF
9/14/2010 12:35:50 AM -         MinVersion   : 10.0
9/14/2010 12:35:50 AM -         MaxVersion   :
9/14/2010 12:35:50 AM -         MoreInfoURL  :
9/14/2010 12:35:50 AM -         Nested       : No
9/14/2010 12:35:50 AM -
9/14/2010 12:35:50 AM -
9/14/2010 12:35:50 AM - Uninstalling 'MyExtension', version 1.0.0.0.
9/14/2010 12:35:50 AM - System.IO.IOException: Cannot create a file when that file already exists.

   at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.Uninstall(IInstalledExtension extension)
   at VSIXInstaller.App.UninstallExtensionFromSKU(String vsixID, SupportedVSSKU sku)

 

I searched for all occurrences of the GUID of my extension in registry, and deleted it. I also removed the extensions marked deleted in "HKLM\Microsoft\VisualStudio\10.0\ExtensionManager\PendingDeletions" in registry.

But the extension refuses to get uninstalled. Any help will be much appreciated.

解决方案

I was able to find a solution to this. I read somewhere that when we try to uninstall an extension, it is marked deleted, and is deleted later.

I had my extension dll and vsixmanifest file installed in


VS2010InstallDir\Common7\IDE\Extensions. I looked in that directory, there already existed files which marked my extension for deletion. There were 2 files created by VS, "Mypackage.pkgdef.deleteme" and "extension.vsixmanifest.deleteme" in the directory. When I was trying to uninstall my extension through Tools->Extension Manager, or using VSIXInstaller.exe, VS was trying to create the same 2 files, to mark it as deleted. So it failed with IOException, since the files already existed. I am not sure how VS reached this state, but deleting these 2 "*.deleteme" files did the trick.

If I had installed my extension by copying in the user Appdata area, simply deleting extension folder in the Appdata area would have done the job.


这篇关于扩展程序无法在Visual Studio 2010中卸载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆