I have a problem. I opened my project this morning and got the error:
The type or namespace name 'OpenIddictDbContext<,,>' could not be found (are you missing a using directive or an assembly reference?) [netcoreapp1.1]
This error occurred when I restored and built my project. It's strange because I do have "OpenIddict": "1.0.0-*", in my project.json file and I am using the reference: using OpenIddict;
This issue causes problems everywhere in my project because he doesn't seem to recognise "using OpenIddict"
If it helps, this is an example where I got the error (ApplicationDbContext.cs)
namespace Overnight.Db
{
//the error: The type or namespace name 'OpenIddictDbContext<,,>' could not be found (are you missing a using directive or an assembly reference?)
public class ApplicationDbContext : OpenIddictDbContext<ApplicationUser, ApplicationRole, Guid>
{
or
//the error: 'OpenIddictDbContext<ApplicationUser, ApplicationRole, Guid>' does not contain a constructor that takes 1 arguments
protected override void OnModelCreating(ModelBuilder builder)
{
Here's my project.json:
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0"
},
"Microsoft.EntityFrameworkCore.Design": "1.0.0-preview2-final",
"AspNet.Security.Oauth.Validation": "1.0.0-alpha2-final",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0",
"OpenIddict": "1.0.0-*",
"Npgsql.EntityFrameworkCore.PostgreSQL": "1.0.1-*",
"Npgsql.EntityFrameworkCore.PostgreSQL.Design": "1.0.1-*",
"Bogus": "7.1.6",
"Overnight.Models": {
"target": "project",
"version": "1.0.0-*"
}
},
"frameworks": {
"netcoreapp1.1": {}
},
"tools": {
"Microsoft.EntityFrameworkCore.Tools": {
"version": "1.0.0-preview2-final"
}
}
}
It's strange because every project I open in my visual code has this error so I don't think it has to do with my project.