I am working on ASP.NET MVC project where I have one solution dotnetmvc which contains two projects:
- dotnetmvc (main project)
- Service (contains an interface for it).
My problem is that when I am trying to use an interface from the Service project within a controller of the main project then I am not getting a reference to the interface.
Please refer to the below screenshots:
What am I missing?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
I know of 2 reasons why this would happen:
- your interface is not public. make sure you add public.
public interface IUser
{
.......
}
- the project
dotnetmvcis on a lower dotnet version as theServiceproject
- Right click on each project, select properties and make sure dotnet version is the same on both projects
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

