dotnet build产生NullReferenceException

时间:2016-07-05 17:24:20

标签: .net .net-core dotnet-cli

我对已知的工作项目进行了更改,现在在使用dotnet build进行构建时,我得到了以下内容:

λ dotnet build
Object reference not set to an instance of an object.

此更改为frameworks部分添加了一个新框架,该部分过去曾有效。我不确定为什么突然停止工作。

1 个答案:

答案 0 :(得分:3)

这是dotnet CLI中的已知bug。如果您向project.json添加新框架但不运行dotnet restore,则会发生这种情况。

首先恢复修复问题:

λ dotnet restore

log  : Restore completed in 2138ms.

λ dotnet build

Compilation succeeded.
    0 Warning(s)
    0 Error(s)
相关问题