我按照这里的步骤操作:http://dotnet.github.io/getting-started/
但总是得到如下错误:
在 MAC 操作系统上
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Console, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
在 Ubuntu 14.04 LTS
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.IO, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at System.Console.WriteLine(String value)
at HelloWorldSample.Program.Main()
最佳答案
听起来你错过了 dotnet restore
步。如果不是,请检查在该步骤中发生的错误。这就是通过 NuGet 引入额外包的原因。
与以前版本的 .NET Framework(所有程序集通常一起交付)不同,.NET Core 是非常模块化的,您的项目只会引入它需要的那些。
关于.net-core - 在 Mac OS 和 Ubuntu 上安装 .net core 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33841971/