Reputation: 681
I've tried to get NancyFx running with .Net Core under Ubuntu and Windows but I get the message that NancyFx it not compatible with .NetCoreApp. I'm new to the whole .Net Core thing, so any help is welcome.
My project.json
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": "1.0.1",
"Nancy": "2.0.0-barneyrubble"
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
Error Message on dotnet restore
Errors in D:\User\Documents\Visual Studio 2015\Projects\WebService\src\WebService\project.json Package Nancy 2.0.0-barneyrubble is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Nancy 2.0. 0-barneyrubble supports: - net452 (.NETFramework,Version=v4.5.2) - netstandard1.6 (.NETStandard,Version=v1.6) One or more packages are incompatible with .NETCoreApp,Version=v1.0.
dotnet --version
1.0.0-preview2-003131
There are a few tutorial around which show people using Nancy on .Net Core, so am I doing something wrong?
Upvotes: 2
Views: 1281
Reputation: 681
I've found the answer. The problem was the missing type in the Microsoft.NETCore.App dependency.
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.1",
"type": "platform"
},
"Nancy": "2.0.0-barneyrubble"
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
Builds perfectly on Windows and Linux.
Upvotes: 2