2
我做出了改变,以一个已知的工作项目,现在有dotnet build
建设时,我得到如下:DOTNET编译产生的NullReferenceException
λ dotnet build
Object reference not set to an instance of an object.
的变化是增加一个新的框架,到frameworks
部分,这在已经工作过去。我不知道为什么它突然停止工作。
我做出了改变,以一个已知的工作项目,现在有dotnet build
建设时,我得到如下:DOTNET编译产生的NullReferenceException
λ dotnet build
Object reference not set to an instance of an object.
的变化是增加一个新的框架,到frameworks
部分,这在已经工作过去。我不知道为什么它突然停止工作。
这是在dotnet CLI中已知的bug。如果您向project.json
添加新框架但不运行dotnet restore
,则会发生这种情况。
首先恢复修复该问题:
λ dotnet restore
log : Restore completed in 2138ms.
λ dotnet build
Compilation succeeded.
0 Warning(s)
0 Error(s)