AspNetZero 4.6.1 - 实体类型 "Capture" 需要定义主键
AspNetZero 4.6.1 - Entity Type "Capture" requires a primary key to be defined
我最近将 Visual Studio 的版本更新到了 15.8.2。我现在无法再构建我的 AspNetZero MVC 项目。我收到实体类型 "Capture" 需要主键的错误。问题是 "Capture" 在项目中不存在。我相信它是编译的。
有其他使用 AspNetZero 的人遇到过这个问题并且知道如何解决吗?
从模型构建器调试视图:
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]
我不知道为什么会这样,但是当我从我在 TFS 中的主分支中重新拉下来、清理、重建并在本地播放项目时,一切又开始工作了。
我最近将 Visual Studio 的版本更新到了 15.8.2。我现在无法再构建我的 AspNetZero MVC 项目。我收到实体类型 "Capture" 需要主键的错误。问题是 "Capture" 在项目中不存在。我相信它是编译的。
有其他使用 AspNetZero 的人遇到过这个问题并且知道如何解决吗?
从模型构建器调试视图:
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]
我不知道为什么会这样,但是当我从我在 TFS 中的主分支中重新拉下来、清理、重建并在本地播放项目时,一切又开始工作了。