最近,我将Visual的版本更新为15.8.2。我现在不能再构建我的AspNetZero MVC项目了。我得到实体类型“捕获”需要一个主键的错误。问题是“捕获”在项目中不存在。我相信这是汇编出来的。
AspNetZero的其他人是否有过这个问题,并且知道如何解决?
在modelBuilder调试视图中:
EntityType: Capture
Properties:
Discriminator (no field, string) Shadow Required AfterSave:Throw 0 0 -1 0 -1
Annotations:
ValueGeneratorFactory: System.Func`3[Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator]
GroupTempId1 (no field, Nullable<int>) Shadow FK Index 1 1 0 1 -1
TempId (no field, Nullable<int>) Shadow Required AlternateKey AfterSave:Throw 2 2 1 2 -1
TempId1 (no field, int) Shadow Required AlternateKey AfterSave:Throw 3 3 2 3 -1
Keys:
TempId
TempId1
Foreign keys:
Capture {'GroupTempId1'} -> Group {'TempId1'} ToDependent: Captures
Annotations:
Relational:DiscriminatorProperty: Discriminator
Relational:DiscriminatorValue: Capture
RelationshipDiscoveryConvention:NavigationCandidates: System.Collections.Immutable.ImmutableSortedDictionary`2[System.Reflection.PropertyInfo,System.Type]发布于 2018-12-03 16:30:39
我不知道为什么会发生这种情况,但是当我从我在TFS的主要分支机构重新拆掉,清理,重建,并在本地执行这个项目时,一切都重新开始了。
https://stackoverflow.com/questions/53597466
复制相似问题