【问题标题】:Visual Studio launch error: Retrieving the COM class factory for component with CLSID failed with Access is denied errorVisual Studio 启动错误:检索具有 CLSID 的组件的 COM 类工厂失败,访问被拒绝错误
【发布时间】:2022-01-25 14:04:21
【问题描述】:

我最近在我的机器上安装了 Visual Studio 2022。我在启动时收到此错误:由于以下错误,检索具有 CLSID {177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D} 的组件的 COM 类工厂失败:80070005 访问被拒绝。 我尝试安装 2019 并得到同样的错误。附上以下截图:

活动日志向我详细展示了同样的事情

<entry>
<record>153</record>
<time>2021/12/25 16:16:04.905</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Visual Studio Common IDE Package]Source: &apos;mscorlib&apos; Description: Retrieving the COM class factory for component with CLSID {177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).&#x000D;&#x000A;System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).&#x000D;&#x000A;   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandleInternal&amp; ctor, Boolean&amp; bNeedSecurityCheck)&#x000D;&#x000A;   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark)&#x000D;&#x000A;   at System.Activator.CreateInstance(Type type, Boolean nonPublic)&#x000D;&#x000A;   at System.Activator.CreateInstance(Type type)&#x000D;&#x000A;   at Microsoft.VisualStudio.CommonIDE.PreviewFeatures.UsePreviewSdk.IsPreviewChannel()&#x000D;&#x000A;   at Microsoft.VisualStudio.CommonIDE.PreviewFeatures.UsePreviewSdk.Initialize()&#x000D;&#x000A;   at Microsoft.VisualStudio.CommonIDE.BasePackage.&lt;InitializeAsync&gt;d__6.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.CommonIDE.CommonIDEPackage.&lt;InitializeAsync&gt;d__20.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass20_0.&lt;&lt;Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTask.&lt;JoinAsync&gt;d__76.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)</description>
<guid>{6E87CFAD-6C05-4ADF-9CD7-3B7943875B7C}</guid>
<hr>80070005 - E_ACCESSDENIED</hr>
<errorinfo></errorinfo>

我尝试在我的 Windows 10 操作系统中将当前本地用户的权限级别设置为完全控制。但它不起作用。 我什至按照link 进行故障排除。按照那里的解决方案,但仍然没有运气。

我知道它与 Visual Studio 没有直接关系,但是为我机器的本地用户设置的权限级别有问题,我没有更改该设置,但我仍然无法找到任何解决方案.

【问题讨论】:

标签: windows visual-studio


【解决方案1】:

经过这么多的忙碌终于找到了解决我的问题的方法。从一开始,很明显,授予安装 Visual Studio 安装程序的用户的权限存在一些问题。虽然我的用户是管理员用户。基本上,我按照以下步骤来解决它:

  • 以管理员身份运行安装程序(右键-->以管理员身份运行)
  • 在此之前导航到 Program Files --> Microsoft Visual Studio
  • 右键-->属性-->安全(确保管理员有完全控制权)
  • 第二次右键单击 --> 属性 --> 安全 --> 高级 --> 将设置的所有者更改为管理员
  • 还要确保选中替换所有子对象复选框
  • 现在以管理员身份运行安装程序。 这为我解决了这个问题。希望这也能帮助其他面临类似问题的人。

【讨论】:

    猜你喜欢
    • 2017-06-05
    • 2015-03-12
    • 2016-02-13
    • 1970-01-01
    • 2012-04-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多