Can I use my existing .Net 4.0 Class Libraries on WinRT Metro Style Applications for Windows 8

☆樱花仙子☆ 提交于 2019-12-05 23:50:24

问题


I just started diving into Metro Style application development and I realized that there is no framework targeted when I look at the properties of the application.

So, can I use my existing .Net 4.0 Class Libraries (or previous ones) on WinRT Metro Stype Applications for Windows 8?

For example, I would like to get the Autofac and use it but I am not sure if it would be a right fit.

Edit

I think it is actually targeting .Net Framework Core 4.5.


回答1:


Whilst a number of WinRT APIs are quite similar to the .NET APIs, you cannot directly share class libraries. This is the same situation with WPF, Silverlight and Silverlight for Windows Phone, where the APIs are similar but class libraries are not interchangeable. You can however target these three platforms if you use the Portable Class Library (PCL). I guess there is a chance that the PCL might support WinRT in the future, however, I am sure it will be much like XBox360 support, where only the core libraries can beshared.



来源:https://stackoverflow.com/questions/9056452/can-i-use-my-existing-net-4-0-class-libraries-on-winrt-metro-style-applications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!