I have set up an Azure service fabric project in Visual Studio, and created an ASP .net core service. I now need to reference a class library, but no matter what I try I get a 'The dependency could not be resolved error'. Here is my .net core project.json:
{
"dependencies": {
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.ServiceFabric": "5.1.163",
"Microsoft.ServiceFabric.Data": "2.1.163",
"Microsoft.ServiceFabric.Services": "2.1.163",
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0",
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final"
},
"tools": {
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"net46": {
"dependencies": {
"ClassLibrary3": {
"target": "project" }
}
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"publishOptions": {
"include": [
"wwwroot",
"Views",
"Areas/**/Views",
"appsettings.json",
"web.config"
]
},
"scripts": {
}
}
This is the class library's project.json:
{
"version": "1.0.0-*",
"dependencies": {
},
"frameworks": {
"net46": {}
}
}
The class library is a .net core class library. What am I missing here?