gpt4 book ai didi

visual-studio - Visual Studio 安装程序缺少选项值 : InstallPath - Visual Studio 2019

转载 作者:行者123 更新时间:2023-12-04 08:51:39 35 4
gpt4 key购买 nike

我安装了具有有效许可证(Visual Studio 订阅)的 Visual Studio 2019 企业版(VS 2019 16.1.4),它运行良好。

突然之间,当我尝试打开项目或项目中的任何文件时,我收到以下错误。

enter image description here

所以我尝试使用 Visual Studio 卸载程序卸载,当我选择卸载程序时,它会自动更新,当我现在打开卸载程序时,它说

enter image description here

当我点击确定时,它说你还没有安装任何东西,它只有安装 VS 2019 16.2.0 的选项。

即使我尝试安装 VS 2019 16.2.0 ,我也会看到错误

"Visual Studio cannot be installed to a nonempty directory 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise'."



请帮我解决错误。

更新
=====================
12-08-2019 06:31:09 PM
Recoverable
System.AggregateException: One or more errors occurred. ---> System.Runtime.InteropServices.COMException: Element not found. (Exception from HRESULT: 0x80070490)
at Microsoft.VisualStudio.Setup.Configuration.ISetupConfiguration.GetInstanceForCurrentProcess()
at Microsoft.VisualStudio.ProjectSystem.VS.DotNetCoreProjectCompatibilityDetector.<IsPrereleaseAsync>d__44.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.VS.DotNetCoreProjectCompatibilityDetector.<IsPreviewSDKInUseAsync>d__43.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.VS.DotNetCoreProjectCompatibilityDetector.<CheckCompatibilityAsync>d__47.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.VS.DotNetCoreProjectCompatibilityDetector.<<InitializeAsync>b__40_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.ProjectMultiThreadedService.<>c__DisplayClass32_1.<<Fork>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>g__action|0()
at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.Runtime.InteropServices.COMException (0x80070490): Element not found. (Exception from HRESULT: 0x80070490)
at Microsoft.VisualStudio.Setup.Configuration.ISetupConfiguration.GetInstanceForCurrentProcess()
at Microsoft.VisualStudio.ProjectSystem.VS.DotNetCoreProjectCompatibilityDetector.<IsPrereleaseAsync>d__44.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.VS.DotNetCoreProjectCompatibilityDetector.<IsPreviewSDKInUseAsync>d__43.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.VS.DotNetCoreProjectCompatibilityDetector.<CheckCompatibilityAsync>d__47.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.VS.DotNetCoreProjectCompatibilityDetector.<<InitializeAsync>b__40_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.ProjectMultiThreadedService.<>c__DisplayClass32_1.<<Fork>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>g__action|0()
at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )<---

===================

我开始非常频繁地(每周两次)面对这个问题,唯一的解决方案是每次都重新安装。所以暂时将VS降级到2017年。

最佳答案

要卸载VS 2019,请按照以下步骤清理已安装的VS并重新安装:

• 查看您的计算机上是否有此文件:“%programfiles(x86)%\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe”

• 如果是这样,请使用 -full 参数从管理员命令提示符启动它:
InstallCleanup.exe -full

• 如果没有,请手动删除“%programfiles(x86)%\Microsoft Visual Studio\Installer”文件夹

• 重新启动新下载的 vs_enterprise.exe(或 vs_professional.exe 或 vs_community.exe...)

• 允许安装安装程序的第一步

• 一旦安装程序出现并且您可以看到工作负载选择(.net 桌面等),请关闭它

• 启动相同的InstallCleanup.exe 来清理旧版本的VS

• 然后重新运行 VS 安装程序进行安装

然后请让我们知道这是否适合您。

关于visual-studio - Visual Studio 安装程序缺少选项值 : InstallPath - Visual Studio 2019,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57216284/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com