Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

References asp.net web api core project (.net framework) from class library (.net core)

$
0
0

Hi , i have created a asp.net web api core project  name XXXXX (.net framework) .  here is the  project.json file

{"buildOptions": {"emitEntryPoint": true,"preserveCompilationContext": true
	},"dependencies": {"Microsoft.AspNet.Identity.EntityFramework": "2.2.1","Microsoft.AspNetCore.Authentication.JwtBearer": "1.1.2","Microsoft.AspNetCore.Identity": "1.1.2","Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.2","Microsoft.AspNetCore.Mvc": "1.0.1","Microsoft.AspNetCore.Routing": "1.0.1","Microsoft.AspNetCore.Server.IISIntegration": "1.0.0","Microsoft.AspNetCore.Server.Kestrel": "1.0.1","Microsoft.EntityFrameworkCore.Relational": "1.1.2","Microsoft.EntityFrameworkCore.SqlServer": "1.1.2","Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0","Microsoft.Extensions.Configuration.FileExtensions": "1.0.0","Microsoft.Extensions.Configuration.Json": "1.0.0","Microsoft.Extensions.Logging.Console": "1.0.0","Microsoft.Extensions.Logging.Debug": "1.0.0","Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0","System.IdentityModel.Tokens.Jwt": "5.1.2"
	},"frameworks": {"net461": {}
  },"publishOptions": {"include": ["wwwroot","**/*.cshtml","appsettings.json","web.config"
			]
		},"scripts": {"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
		},"tools": {"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
		}
	}

And I have created a  ClassLibrary (.NET Core) named YYYYY .  Here is the project.json file

{"version": "1.0.0-*","dependencies": {"NETStandard.Library": "1.6.0"
  },"frameworks": {"netstandard1.6": {"imports": "dnxcore50"
    }
  }
}

But when I try to reference the asp.net core project from my .net core class library , I have the following error :

The following projects are not supported as references : XXXXX has targer frameworks that are incompatible with targets in current project YYYYY

XXXXX: .NETStandard,Version=v1.6
YYYYY: .NETFramework,Version =v4.6.1


Viewing all articles
Browse latest Browse all 9386

Trending Articles