将C#mono移植到dotnet核心
我有一个简单的C#mono项目,我想将其移植到dotnet core。它使用将C#mono移植到dotnet核心,c#,mono,.net-core,C#,Mono,.net Core,我有一个简单的C#mono项目,我想将其移植到dotnet core。它使用FluentNHibernate 我使用dotnet new创建了一个新项目,并将源代码复制到我的新项目中。我修改了project.json文件以使用net452,并包含了FluentNHibernate依赖项。这是我的档案: { "version": "1.0.0-*", "buildOptions": { "debugType": "portable", "emitEntryPoint": true
FluentNHibernate
我使用dotnet new
创建了一个新项目,并将源代码复制到我的新项目中。我修改了project.json
文件以使用net452
,并包含了FluentNHibernate
依赖项。这是我的档案:
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": { },
"frameworks": {
"net452": {
"dependencies": {
"FluentNHibernate": "2.0.3"
}
}
}
}
运行dotnet还原时
运行时没有错误,但当我运行dotnet运行时
会出现名称空间错误:
/ILRBdotnet/obj/Debug/net452/dotnet-compile.assemblyinfo.cs(2,11): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
所有错误都指出找不到
System
(或任何其他System.String
)类型或命名空间。我缺少什么?尝试删除bin
和obj
文件夹,然后再次使用dotnet build
。它应该创建正确的dotnet compile.assemblyinfo.cs
文件。@Set我试过了,但没有效果。