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

Cannot use .net core class lib objects in .net core api project.

$
0
0

First time using .net core.

Created a new solution and then added a api project (.net core), added all the basic stuff to get it work (EF, models, etc)

Then wanted to split things out a bit and moved my models to a separate project (new class library, .net core)

Added a reference in my api project to my domain class library, but cannot get VS to use these models in my api.

Not sure there's some special step involved here?

Perhaps it's the frameworks listed in project.json?

API project.json

"frameworks": {"netcoreapp1.0": {"imports": ["dotnet5.6","portable-net45+win8"
      ]
    }
  },

Class library project.json

"frameworks": {"netstandard1.6": {"imports": "dnxcore50"
    }
  }


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>