问题描述
我已经安装了.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).
如果我创建了 any .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 /工具与工具VS
- 重新启动
- Deleting
project.lock.json
- Deleting the
.vs
folder - Repairing the .NET Core install
- Repairing the VS 2015 install
- Uninstalling and reinstalling .NET Core/SDK/Tooling & VS
- Rebooting
它仍然拒绝工作!
我已经在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 :
.NET Core需要VC ++可重新分发在Windows上运行时。
https://docs.microsoft.com/en-us/dotnet/articles/core/windows-prerequisites"NET Core requires the VC++ Redistributable when running on Windows"
如果不起作用,请在应用程序的最高级别添加try / catch并记录所有可能发生的System.Exception。它可能会为您提供有关此错误的更多信息。
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 Files\dotnet\dotnet.exe”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!