简体   繁体   中英

Referencing ASP.NET Core Web Application(.NET Core) from Class Library (.NET Core)

I am trying to add reference to ASP.NET Core Web Application from Class Library project (.NET Core) which will be my Unit Tests project.

I am getting error with default empty projects(File -> New Project): 在此处输入图片说明

I have tried to downgrade Tests project to 1.4 with no success.

netcoreapp is for applications(web, console and test ), netstandard is for class library projects.

So, changing netstandard1.5 to netcoreapp1.0 in test project's project.json will solve your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM