Can't run the .NET core default app

649 Views Asked by At

I followed the instruction on https://dotnet.github.io/getting-started/ I installed .NET Core on Windows 8.1 and executed in an empty folder:

dotnet new
dotnet restore
dotnet run

The packages were downloaded, the application compiled, but the execution finished with the Exception.

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

What could be the problem?

1

There are 1 best solutions below

0
On

I tried to reproduce on my Windows 8.1 and it works.

Which version of dotnet cli are you using (run dotnet --version)? The latest installer can be found here

You can also try to run in with verbose output enabled: dotnet --verbose run

My (working) output is below. Can you see any difference?

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!