0

I am working on ASP.NET MVC project where I have one solution dotnetmvc which contains two projects:

  1. dotnetmvc (main project)
  2. 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:

Screenshot 1 enter image description here

Screenshot 2 enter image description here

What am I missing?

1
  • Please show your IUser code with namespace. Commented Nov 7, 2020 at 21:50

1 Answer 1

2

I know of 2 reasons why this would happen:

  1. your interface is not public. make sure you add public.
public interface IUser
{
 .......
}
  1. the project dotnetmvc is on a lower dotnet version as the Service project
  • Right click on each project, select properties and make sure dotnet version is the same on both projects
Sign up to request clarification or add additional context in comments.

1 Comment

Yes you are right, My interface is not Public, Now it`s working fine and proper. Thankyou very much for helping me thanks a lot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.