Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add controller dialog not listing External Model Classes

I am trying to separate entity model from main project so i can reference it from multiple projects. Here are the steps i followed

  1. First I created Class Library STSModels which has model classes and DBContext.
  2. Now i created an ASP.NET MVC 5 project TestApp.
  3. Added same DBcontext to TestApp's web.config as i created in STSModels.
  4. Added STSModels compiled DLL reference to TestApp project.
  5. Now i tried to add controller in MVC project, but it is not showing any Model class from STSModels.

Add Controller Screenshot

I have already tried following with no luck

  1. Rebuild TestApp project

  2. Confirmed under STSModel project Metadata Artifact Processing property set to Embed in Output Assembly.

  3. Removing and adding STSModels reference multiple times.

However instead of adding reference to STSModels compiled DLL, if i add Project Reference to STSModels project then it is showing all Model Classes. But it is not what i want.

What could be wrong here?

like image 915
SamTech Avatar asked Apr 16 '26 02:04

SamTech


1 Answers

Bingo! Just two steps

1)Update your Visual studio 2013 to new update 1

2) unload your project from solution explorer then Reload it again.

like image 157
Umar Abbas Avatar answered Apr 18 '26 15:04

Umar Abbas