多目标.NET Core项目 - 其他程序集中的错误引用类型

时间:2016-09-21 00:05:00

标签: .net-core

我在Dna.Net.Core.Smtp项目中有几个引用错误:

  

找不到类型或命名空间名称“ISystemSetting_Queries”   (你错过了使用指令或程序集吗?   参考?)Dna.Net.Core.Smtp..NET Framework 4.6.2

  • “ISystemSetting_Queries”确实存在于Dna.Net.Core.BLL项目中
  • 所有project.json文件都正在成功还原包
  • Dna.Net.Core.Smtp是唯一引用“net462”
  • 的项目

另一个问题是:

  

名称空间中不存在类型或命名空间名称“Mail”   'System.Net'(您是否缺少程序集引用?)

当我将鼠标悬停在System.Net.Mail上时,会弹出一个对话框,说明:

  

命名空间:System.Net.Mail

     

Dna.Net.Core.Smtp..NET Framework 4.6.2 - 可用

     

Dna.Net.Core.Smtp..NET标准版,版本= 1.6 - 不可用

     

您可以使用导航栏切换上下文

导航栏显示Dna.Net.Core.Smtp..NET Framework 4.6.2作为当前选择。

以下是project.json文件:

Dna.Net.Core.Smtp.project.json

{
  "name": "Dna.Net.Core.Smtp",
  "version": "1.0.0-*",  
  "dependencies": {
    "NETStandard.Library": "1.6.0"
  },
  "frameworks": {
    "net462": {},
    "netstandard1.6": {
      "dependencies": {
        "Dna.Net.Core": {
          "version": "1.0.0-*",
          "target": "project"
        },
        "Dna.Net.Core.BLL": {
          "version": "1.0.0-*",
          "target": "project"
        },
        "Dna.Net.Core.DAL.EF": {
          "version": "1.0.0-*",
          "target": "project"
        }
      },
      "imports": "dnxcore50"
    }
  }
}

Dna.Net.Core.DAL.EF.project.json

{
  "name": "Dna.Net.Core.DAL.EF",
  "version": "1.0.0-*",

  "dependencies": {
    "Autofac": "4.1.0",
    "Microsoft.EntityFrameworkCore": "1.0.1",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.0.1",
    "NETStandard.Library": "1.6.0"
  },

  "frameworks": {
    "netstandard1.6": {
      "dependencies": {
        "Dna.Net.Core": {
          "version": "1.0.0-*",
          "target": "project"
        },
        "Dna.Net.Core.BLL": {
          "version": "1.0.0-*",
          "target": "project"
        }
      },
      "imports": "dnxcore50"
    }
  }
}

Dna.Net.Core.BLL.project.json

{
  "name": "Dna.Net.Core.BLL",
  "version": "1.0.0-*",

  "dependencies": {
    "Autofac": "4.1.0",
    "AutoMapper": "5.1.1",
    "NETStandard.Library": "1.6.0",
    "System.ComponentModel.Annotations": "4.1.0",
    "System.Security.Claims": "4.0.1"
  },

  "frameworks": {
    "netstandard1.6": {
      "dependencies": {
        "Dna.Net.Core": {
          "version": "1.0.0-*",
          "target": "project"
        }
      },
      "imports": "dnxcore50"
    }
  }
}

Dna.Net.Core.project.json

{
  "name": "Dna.Net.Core",
  "version": "1.0.0-*",

  "dependencies": {
    "Autofac": "4.1.0",
    "NETStandard.Library": "1.6.0",
    "System.Data.SqlClient": "4.1.0",
    "System.Runtime.Serialization.Formatters": "4.0.0-rc3-24212-01",
    "System.Runtime.Serialization.Primitives": "4.1.1"
  },

  "frameworks": {
    "netstandard1.6": {
      "imports": "dnxcore50"
    }
  }
}

这张照片出了什么问题?

0 个答案:

没有答案
相关问题