【发布时间】:2017-02-05 07:26:40
【问题描述】:
我正在使用 Visual Studio Update 3 + Update 3 补丁。我使用 C# Cross-Platform 模板创建了一个空白 XAML App(Xamarin.Forms Portable) 解决方案。我在配置管理器中选中了构建和部署。我已将解决方案更新为 Xamarin.Forms 2.3.2.127(2.2 版本有同样的问题)。到目前为止,我已经能够运行 Android 和 iOS 应用程序。我没有对源代码进行任何更改,我使用的是空项目。尝试运行 UWP 应用时,App.xaml.cs 中出现错误:
Xamarin.Forms.Forms.Init(e)
System.AggregateException: One or more errors occurred.
(Error HRESULT E_FAIL has been returned from a call to a COM component.) --->
System.Runtime.InteropServices.COMException:
Error HRESULT E_FAIL has been returned from a call to a COM component.
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Xamarin.Forms.Platform.UWP.WindowsBasePlatformServices.GetAssemblies()
at Xamarin.Forms.Registrar.RegisterAll(Type[] attrTypes)
at Xamarin.Forms.Forms.Init(IActivatedEventArgs launchActivatedEventArgs, IEnumerable`1 rendererAssemblies)
at Tester.UWP.App.OnLaunched(LaunchActivatedEventArgs e)
---> (Inner Exception #0) System.Runtime.InteropServices.COMException (0x80004005):
Error HRESULT E_FAIL has been returned from a call to a COM component.
【问题讨论】:
标签: c# xamarin.forms