本文介绍了Microsoft.DotNet.Common.Targets(262,5):错误:未将对象引用设置为对象的实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将一个库从 .Net 4.5 迁移到 .net core.我已经有了 .xproj,但是当我运行 dotnet build 时出现错误:

I am migrating a library from .Net 4.5 to .net core. I already have the .xproj in place, but when I run dotnet build I get the error:

Microsoft.DotNet.Common.Targets(262,5):错误:对象引用未设置为对象的实例.

这是我的 project.json 文件:

{
  "version": "1.0.0",

  "frameworks": {
    "net45": {
      "frameworkAssemblies": {
        "System.Collections.Concurrent": {
          "type": "build"
        }
      }
    },
    "netstandard1.6": {
      "imports": "dnxcore50",
      "dependencies": {
        "NETStandard.Library": "1.6.0"
      }
    }
  }
}

有什么我遗漏的吗?

推荐答案

Running dotnet restore from command line 工作但不是来自 Visual Studio 2015 Update 3.我怀疑这与拥有私有nuget 提要.

Running dotnet restore from command line worked but not from Visual Studio 2015 Update 3. I suspect this has something to do with having private nuget feeds.

这篇关于Microsoft.DotNet.Common.Targets(262,5):错误:未将对象引用设置为对象的实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 08:19