0

I have just created a ASP.NET web API project with Visual Studio 17 and I have created a Class Library to connect it to an SQL database I created. the problem is when I try to create a controller in the project, I get the error,

There was an error running the selected code generator: could not load file 'ClassLibrary.dll' or one of it's dependencies. this system could not find the file specified.

Does anyone what the problem could be. I have looked at the folder where the said file should be contained in the ClassLibrary and it is empty.

I gather that it might be from my Entity Framework, I am using ADO.Net Entity Data Model.

2
  • check Framework version for these projects Commented Jun 15, 2017 at 16:17
  • You might also want to just close & reopen visual studio. Commented Jun 15, 2017 at 16:34

2 Answers 2

1

For ASP.NET web API project no need to add Class Library:

  • Just right click in Solution and add ADO.net Model
  • Configure with Database
  • Add required Database Tables
  • Build solution
Sign up to request clarification or add additional context in comments.

Comments

1

First you have to add reference of your class library project if you don't then just give a built to your project in which you added a reference of class library project, then try to create a controller it will definitely help you....

1 Comment

Please provide additional details in your answer. As it's currently written, it's hard to understand your solution.

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.