Add Controller Model Classes not shown

后端 未结 14 833
天命终不由人
天命终不由人 2020-12-31 09:41

I managed to create a Model First DBContext model (before it was a normal ObjectContext derived model).

Strangly now my VS is not showing ANY of my classes in the Mo

14条回答
  •  旧巷少年郎
    2020-12-31 10:13

    This problem can occur when you have a project referencing another project. This is called a transitive project reference and manifests in a number of ways, one of which is this. You need to directly reference projects and not transitively to resolve this in some cases.

    eg: Project A , project B, Project C

    Project B has a reference to C so in repos/b/bin/debug you have b.dll and c.dll Project A needs both so you point the reference to B.dll and C.dll in the b/bin/debug folder. If you do this you can't see any models from c.dll but you can see the b.dll models.

    fix/workaround: reference repos/b/bin/debug/b.dll and repos/c/bin/debug/c.dll directly

提交回复
热议问题