Link to another project in .Net Core

I have 6 projects in their purest form. I just want to relate the project to another. I have HomeControllerprojects Blog.Web . I want to access other project methods, such as IOrganizationServicein Blog.Services projects . How can I use the IOrganization method in the HomeController class? See figure for a clear understanding.enter image description here

Red marks indicate errors ....

+8
source share
1 answer

It looks like you created everything as websites, but I suspect that most of these projects should actually be class libraries (dlls), not sites. You may need to reset a few things!

You can right-click on the Dependencies node to add a link to the project: enter image description here

or node project:

enter image description here

then: enter image description here

Alternatively: edit csproj and add <ProjectReference>node:enter image description here

+22
source

Source: https://habr.com/ru/post/1679713/


All Articles