小编Trí*_*hồn的帖子

所有故事板、xib 文件都不会在 Macbook Pro M1 上使用 rosetta 更新框架或约束(遇到与 IBAgent-iOS 通信的错误)

我尝试在我的项目中添加约束或加载一些情节提要或 XIB 文件,但情节提要没有更新并且看不到任何内容。这是我的错误屏幕截图:

在第一张图片中,标签显示在模拟器中,但故事板没有

此 .xib 文件无法加载任何 UI 项

在第一张图片中,标签显示在模拟器中,但故事板没有。

在第二张图中,.xib 文件无法加载任何 UI 项

这是我的错误日志:

================================ 日期:============== ==================

2020 年 12 月 21 日星期一 14:22:27 日本标准时间 2020-12-21 05:22:27 +0000

================================ XCODE 版本信息:============== ====================

版本 = 12.3 (12C33) 插件版本 = 17701 测试版 = 1 操作系统版本 = 11.1 (20C69)

================================ 错误:============== ==================

与 IBAgent-iOS 通信时遇到错误。(失败原因:IBAgent-iOS (-1) 无法启动):无法通过 CoreSimulator spawn 启动 IBAgent-iOS(失败原因:无法在 iPhone 12 Pro Max (D81D1F57-170A-4089-843E-1D1E58B049C6) 上生成 IBAgent-iOS , iOS 14.3, Booted)): 无效的设备状态

错误域=com.apple.InterfaceBuilder 代码=-1“与 IBAgent-iOS 通信时遇到错误。” UserInfo={NSLocalizedFailureReason=IBAgent-iOS (-1) 启动失败,NSUnderlyingError=0x7fea6c306aa0 {Error Domain=com.apple.CoreSimulator.SimError Code=405“无法通过 CoreSimulator spawn 启动 IBAgent-iOS” UserInfo={NSLocalizedFailureaaa在 …

ios swift xcode12 apple-m1

5
推荐指数
1
解决办法
1099
查看次数

实体框架:无法在“xxx”类上配置,因为它是派生类型

当我尝试自己添加“AppUserRoles”表以从 User 访问 UserRoles 时,出现此错误,例如:

from u in _userManager.Users.Where(x => x.UserRoles "contain" "some codition here")
Run Code Online (Sandbox Code Playgroud)

我得到了这个错误:

无法在“AppUserRoles”上配置密钥,因为它是派生类型。必须在根类型“IdentityUserRole”上配置密钥。如果您不打算将“IdentityUserRole”包含在模型中,请确保它不包含在上下文的 DbSet 属性中、在对 ModelBuilder 的配置调用中引用、或从包含的类型的导航属性中引用在模型中。

这是我之前的代码,运行正常:

builder.Entity<IdentityUserRole<Guid>>().ToTable("AppUserRoles")
.HasKey(x => new { x.RoleId, x.UserId });
Run Code Online (Sandbox Code Playgroud)

--->我改成这样:

我的用户等级

[Table("AppUsers")]
public class AppUser : IdentityUser<Guid>, IDateTracking, ISwitchable
{
    public virtual ICollection<AppUserRoles> UserRoles { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

我的角色课

[Table("AppRoles")]
public class AppRole : IdentityRole<Guid>
{
    public virtual ICollection<AppUserRoles> UserRoles { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

我的 appUserRole 类:

[Table("AppUserRoles")]
public class AppUserRoles : IdentityUserRole<Guid>
{

    public virtual AppUser …
Run Code Online (Sandbox Code Playgroud)

entity-framework asp.net-core

3
推荐指数
1
解决办法
4005
查看次数

标签 统计

apple-m1 ×1

asp.net-core ×1

entity-framework ×1

ios ×1

swift ×1

xcode12 ×1