无法启动程序“C:Program Filesdotnetdotnet.exe" [英] Unable to start program "C:Program Filesdotnetdotnet.exe"

查看:91
本文介绍了无法启动程序“C:Program Filesdotnetdotnet.exe"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 .NET Core 1.0.1 以与 VS 2015 Update 3 一起使用,并且我以管理员身份运行(在 Windows 8.1 x64 上).

I've installed .NET Core 1.0.1 to use with VS 2015 Update 3 and I'm running as Administrator (on Windows 8.1 x64).

如果我创建任何 .NET Core 项目,无论是控制台还是 Web 并尝试运行它,Visual Studio 就会出现错误:

If I create any .NET Core project, be it console or web and attempt to run it Visual Studio then comes up with an error:

但是我无法确定原因.VS 构建得很好,我可以从 CLI 运行它.我也可以通过 VSCode 很好地运行 Core.

However I'm unable to ascertain why. VS builds it fine and I can run it from the CLI. I can also run Core fine through VSCode.

我试过了:

  • 删除project.lock.json
  • 删除.vs文件夹
  • 修复 .NET Core 安装
  • 修复 VS 2015 安装
  • 卸载和重新安装 .NET Core/SDK/Tooling &VS
  • 重新启动

它仍然拒绝工作!

我已经在 Core Tooling GitHub 上提出了这个问题,也可以在这里看到,但我们还没有都有些不知所措.

I've raised this on the Core Tooling GitHub as well as can be seen here but as yet we're all a little stumped.

推荐答案

尝试重新安装所需的可再发行组件,因为在 Windows 上执行 .Net Core 需要它们,正如此处所述:

Try re-installing needed redistributables, as they are needed for executing .Net Core on Windows, as it is stated here :

https://docs.microsoft.com/en-us/dotnet/articles/core/windows-prerequisitesNET Core 在 Windows 上运行时需要 VC++ Redistributable"

https://docs.microsoft.com/en-us/dotnet/articles/core/windows-prerequisites "NET Core requires the VC++ Redistributable when running on Windows"

如果它不起作用,请在应用程序的最高级别添加 try/catch 并记录所有可能发生的 System.Exceptions.它可能会为您提供有关此错误的更多信息.

If it don't work, add a try/catch at the highest level of your application and log all System.Exceptions that may occur. It may give you more informations about this error.

这篇关于无法启动程序“C:Program Filesdotnetdotnet.exe"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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