无法运行.NET核心默认应用程序

时间:2016-02-18 19:40:15

标签: .net .net-core coreclr

我按照https://dotnet.github.io/getting-started/上的说明进行操作 我在Windows 8.1上安装了.NET Core并在空文件夹中执行:

dotnet new
dotnet restore
dotnet run

下载了软件包,编译了应用程序,但执行完成了Exception。

  

未处理的异常:System.IO.FileNotFoundException:无法加载   文件或程序集&System; Run.Runtime,Version = 4.1.0.0,Culture = neutral,   公钥= b03f5f7f11d50a3a'或其中一个依赖。

可能是什么问题?

1 个答案:

答案 0 :(得分:0)

我尝试在我的Windows 8.1上重现它并且它可以正常工作。

您使用的是哪个版本的dotnet cli(运行dotnet --version)?可以找到最新的安装程序here

您还可以尝试启用详细输出:dotnet --verbose run

我的(工作)输出如下。你能看出有什么区别吗?

Running C:\Program Files\dotnet\bin\dotnet-build.exe "--output" "C:\Projects\temp\bin\.dotnetrun\d2d6b16263e145a0aa7245c62ff19614" "--temp-output
" "C:\Projects\temp\bin\.dotnetrun\d2d6b16263e145a0aa7245c62ff19614" "--framework" "DNXCore,Version=v5.0" "--configuration" "Debug" "C:\Projects\
temp"
Process ID: 21564
Project temp (DNXCore,Version=v5.0) will be compiled because expected outputs are missing.
 C:\Projects\temp\bin\.dotnetrun\d2d6b16263e145a0aa7245c62ff19614\Debug\dnxcore50\temp.dll
 C:\Projects\temp\bin\.dotnetrun\d2d6b16263e145a0aa7245c62ff19614\Debug\dnxcore50\temp.pdb

Running C:\Program Files\dotnet\bin\dotnet-compile.exe "--framework" "DNXCore,Version=v5.0" "--configuration" "Debug" "--output" "C:\Projects\tem
p\bin\.dotnetrun\d2d6b16263e145a0aa7245c62ff19614" "--temp-output" "C:\Projects\temp\bin\.dotnetrun\d2d6b16263e145a0aa7245c62ff19614" "C:\Project
s\temp"
Process ID: 12284
Compiling temp for DNXCore,Version=v5.0
Running C:\Program Files\dotnet\bin\dotnet-compile-csc.exe "@C:\Projects\temp\bin\.dotnetrun\d2d6b16263e145a0aa7245c62ff19614\dotnet-compile.rsp"

Process ID: 17832
Running C:\Program Files\dotnet\bin\csc.exe "-noconfig" "@C:\Projects\temp\bin\.dotnetrun\d2d6b16263e145a0aa7245c62ff19614\dotnet-compile-csc.rsp
"
Process ID: 3936
C:\Projects\temp\project.json(8,32): warning NU1007: Dependency specified was NETStandard.Library >= 1.0.0-rc2-23727 but ended up with NETStandar
d.Library 1.0.0-rc2-23804.

Compilation succeeded.
    1 Warning(s)
    0 Error(s)

Time elapsed 00:00:04.5670414


Running C:\Projects\temp\bin\.dotnetrun\d2d6b16263e145a0aa7245c62ff19614\Debug\dnxcore50\temp.exe
Process ID: 7480
Hello World!