尝试在Intel Galileo Gen 1主板上运行.NET OWIN自托管应用程序时出现以下异常:
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. ---> System.MissingMethodException:
Method not found: 'Boolean System.Type.op_Equality(System.Type, System.Type)'.
at Microsoft.Owin.Hosting.Services.ActivatorUtilities.CreateFactory(Type type
)
at Microsoft.Owin.Hosting.Services.ServiceProvider.Add(Type serviceType, Type
implementationType)
at Microsoft.Owin.Hosting.Services.ServicesFactory.<>c__DisplayClass1.<Create
>b__0(Type service, Type implementation)
at Microsoft.Owin.Hosting.Services.ServicesFactory.<>c__DisplayClass4.<DoCall
back>b__3(Type service, Type implementation)
at Microsoft.Owin.Hosting.Services.ServicesFactory.DoCallback(Action`2 callba
ck)
at Microsoft.Owin.Hosting.Services.ServicesFactory.DoCallback(IDictionary`2 s
ettings, Action`2 callback)
at Microsoft.Owin.Hosting.Services.ServicesFactory.Create(IDictionary`2 setti
ngs, Action`1 configuration)
at Microsoft.Owin.Hosting.Services.ServicesFactory.Create(IDictionary`2 setti
ngs)
at Microsoft.Owin.Hosting.WebApp.BuildServices(StartOptions options)
at Microsoft.Owin.Hosting.WebApp.Start(StartOptions options)
at Microsoft.Owin.Hosting.WebApp.Start[TStartup](StartOptions options)
at Microsoft.Owin.Hosting.WebApp.Start[TStartup](String url)
at Osborn.Galileo.OwinHost.Program.Main(String[] args)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments,
Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Objec
t[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
at AppDomainManager.HostMain(Int32 argc, Char** argv, Char* assemblyToRun, In
t32 flags)
我的问题分为两部分:
答案 0 :(得分:1)
对于它的价值,.Net CORE运行时大小约为11MB,并且所有项目都可以作为独立应用程序与运行不同依赖项的其他.net项目并行运行。
完整的.net堆栈(大约200MB)不适用于物联网,它从来没有。在网上寻找ASP.Net vNext,了解不久的将来会有什么样子。
答案 1 :(得分:0)
是的,伽利略最终应该支持.NET。它还不是全部。 看看 Windows Developer Program for IoT FAQ
答案 2 :(得分:0)
我怀疑Galileo将会运行.NET框架。它缺乏.NET所依赖的现代指令集。其他人提到的常见问题只是提到“通用应用程序模型”,它可能只是意味着“WinRT”这是一个C ++的东西(但如果你有.NET可以从.NET轻松使用)。但我并不是说我们不会在某些设备上看到.NET ......
说了这么多,你可以使用Jer的Mono端口在galileo上运行.NET应用程序:http://jeremiahmorrill.wordpress.com/2014/09/05/mono-on-windows-for-intel-galileo-source-code/
它不是超级快,但它在大多数情况下都有效。