所以我有一个简单的应用程序,可以在安卓仿真器和物理欧宝手机上工作,但是当我部署到iPhone时,我会遇到很多错误。首先..。
Could not resolve assembly Microsoft.VisualStudio.DesignTools.TapContract一个轻拍的手势肯定会在盒子里起作用吗?
下面是完整的列表:
2022-08-22 23:14:34.473 Xamarin.PreBuilt.iOS[94921:6409975] Could not resolve assembly Microsoft.VisualStudio.DesignTools.TapContract, Version=17.0.0.0, Culture=neutral, PublicKeyToken=null. Details: Could not load file or assembly '/var/mobile/Containers/Data/Application/6B3B6CF6-2A5A-452F-956D-74D8A66941EA/Documents/Lofty.Logbook.content/Microsoft.VisualStudio.DesignTools.TapContract.dll' or one of its dependencies.
2022-08-22 23:14:34.475 Xamarin.PreBuilt.iOS[94921:6409975] Could not resolve assembly Xamarin.HotReload.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. Details: Could not load file or assembly '/var/mobile/Containers/Data/Application/6B3B6CF6-2A5A-452F-956D-74D8A66941EA/Documents/Lofty.Logbook.content/Xamarin.HotReload.Contracts.dll' or one of its dependencies.
Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointSendToIde(System.String)' to D:\a\_work\1\s\HotReload\Source\Xamarin.HotReload.Agent\HotReloadAgent.cs:419 [0x00000].
2022-08-22 23:14:34.617 Xamarin.PreBuilt.iOS[94921:6409975] Could not resolve assembly Xamarin.HotReload.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. Details: Could not load file or assembly '/var/mobile/Containers/Data/Application/6B3B6CF6-2A5A-452F-956D-74D8A66941EA/Documents/Lofty.Logbook.content/Xamarin.HotReload.Contracts.dll' or one of its dependencies.
2022-08-22 23:14:34.618 Xamarin.PreBuilt.iOS[94921:6409975] Could not resolve assembly Microsoft.VisualStudio.DesignTools.TapContract, Version=17.0.0.0, Culture=neutral, PublicKeyToken=null. Details: Could not load file or assembly '/var/mobile/Containers/Data/Application/6B3B6CF6-2A5A-452F-956D-74D8A66941EA/Documents/Lofty.Logbook.content/Microsoft.VisualStudio.DesignTools.TapContract.dll' or one of its dependencies.
Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointCheckpoint()' to D:\a\_work\1\s\HotReload\Source\Xamarin.HotReload.Agent\HotReloadAgent.cs:414 [0x00000].
Resolved pending breakpoint at 'MauiProgram.cs:40,1' to Lofty.Logbook.Database.EntityDbContext Lofty.Logbook.MauiProgram.<>c__DisplayClass0_0.<CreateMauiApp>b__1 (System.IServiceProvider x) [0x00058].
Resolved pending breakpoint at 'MauiProgram.cs:32,1' to Lofty.Logbook.Database.EntityDbContext Lofty.Logbook.MauiProgram.<>c__DisplayClass0_0.<CreateMauiApp>b__1 (System.IServiceProvider x) [0x00023].
Thread started: #7
Thread started: #8
Thread started: #9
2022-08-22 23:14:35.102 Xamarin.PreBuilt.iOS[94921:6409975] Could not resolve assembly System.Private.DataContractSerialization.resources, Version=6.0.0.0, Culture=en-AU, PublicKeyToken=null. Details: Could not load file or assembly '/var/mobile/Containers/Data/Application/6B3B6CF6-2A5A-452F-956D-74D8A66941EA/Documents/Lofty.Logbook.content/System.Private.DataContractSerialization.resources.dll' or one of its dependencies.
2022-08-22 23:14:35.103 Xamarin.PreBuilt.iOS[94921:6409975] Could not resolve assembly System.Private.DataContractSerialization.resources, Version=6.0.0.0, Culture=en, PublicKeyToken=null. Details: Could not load file or assembly '/var/mobile/Containers/Data/Application/6B3B6CF6-2A5A-452F-956D-74D8A66941EA/Documents/Lofty.Logbook.content/System.Private.DataContractSerialization.resources.dll' or one of its dependencies.
2022-08-22 23:14:35.247 Xamarin.PreBuilt.iOS[94921:6409975] Could not resolve assembly Microsoft.EntityFrameworkCore.resources, Version=6.0.8.0, Culture=en-AU, PublicKeyToken=null. Details: Could not load file or assembly '/var/mobile/Containers/Data/Application/6B3B6CF6-2A5A-452F-956D-74D8A66941EA/Documents/Lofty.Logbook.content/Microsoft.EntityFrameworkCore.resources.dll' or one of its dependencies.
2022-08-22 23:14:35.248 Xamarin.PreBuilt.iOS[94921:6409975] Could not resolve assembly Microsoft.EntityFrameworkCore.resources, Version=6.0.8.0, Culture=en, PublicKeyToken=null. Details: Could not load file or assembly '/var/mobile/Containers/Data/Application/6B3B6CF6-2A5A-452F-956D-74D8A66941EA/Documents/Lofty.Logbook.content/Microsoft.EntityFrameworkCore.resources.dll' or one of its dependencies.
[0:] An error occurred: 'e_sqlite3'. Callstack: ' at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)
at SQLitePCL.Batteries_V2.Init()
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)'
The app has been terminated.有人知道怎么解决这个问题吗?我猜sqlite pcl是主要的问题
更新:下面是一个演示项目,说明了我面临的问题。https://github.com/steveski/MauiEFIssue
发布于 2022-08-23 02:41:08
您需要将一个新的Entitlements.plist文件添加到您的.NET Multi-platform App UI (.NET MAUI)应用程序项目中,并将名为.NET的新XML文件添加到应用程序项目的Platforms\iOS\文件夹。然后将以下XML添加到文件中:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>更新:我找到了一个有用的示例,您可以参考它。
https://stackoverflow.com/questions/73445838
复制相似问题