visual-studio-2015 - .Net Core project.json多个同名​​项目

标签 visual-studio-2015 .net-core

我将名为 Common 的项目放置在目录 NamespaceA 中。 我将名为 Common 的项目放置在目录 NamespaceB 中。

现在我想使用project.json在第二个项目中引用第一个项目

但这不可能!

error: Cycle detected: 
error:   Common (>= 9.0.0) -> Common (>= 9.0.0) -> Common (>= 9.0.0).

VS认为两者是同一个项目!

最佳答案

project.json 中,您引用 NuGet 包。如果您有多个具有相同内容的 NuGet 包,则项目系统无法确定哪个是哪个。因此,不幸的是,您的方案不受支持。唯一的解决方案是重命名包。

这几乎就像有两个具有相同名称的类型,两者都被导入并在没有全名的情况下引用它们。编译器将不知道选择哪个。

关于visual-studio-2015 - .Net Core project.json多个同名​​项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38407015/

相关文章:

c# - 将迁移与 Entity Framework Core 结合使用

c# - AWS Lambda 和 ASP.NET Core 日志记录

visual-studio-2015 - 在 Visual Studio 2015 中按行号删除多余空格

rest - Visual Studio 无法在我的 rest api 客户端中添加 swagger 元数据文件

android - Apache Cordova 工具上的 Android 目标构建失败 - Visual Studio Professional 2015

c# - 跳过 HttpResponseMessage Content.ReadAsStream 的第一行(CSV 标题行)

c# - 简单注入(inject)器注入(inject) PageModel ASP.NET Core Razor 页面

.Net Core VS2015,无法加载 DLL 'git2-785d8c4' : The specified module could not be found.(HRESULT 异常:0x8007007E)

c# - 由于异常 : "Access denied for user ' root' @'localhost' (using password: YES)",无法从 C# 应用程序访问 MySQL

entity-framework - 解决 Microsoft.Data.Entity.SqlServer 的依赖关系失败