简体   繁体   English

我可以在Windows 8的WinRT Metro Style应用程序上使用现有的.Net 4.0类库

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

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. 我刚刚开始深入研究Metro Style应用程序开发,我意识到当我查看应用程序的属性时,没有针对性的框架。

So, can I use my existing .Net 4.0 Class Libraries (or previous ones) on WinRT Metro Stype Applications for Windows 8? 那么,我可以在WinRT Metro Stype Applications for Windows 8上使用我现有的.Net 4.0类库(或以前的类库)吗?

For example, I would like to get the Autofac and use it but I am not sure if it would be a right fit. 例如,我想获得Autofac并使用它,但我不确定它是否合适。

Edit 编辑

I think it is actually targeting .Net Framework Core 4.5. 我认为它实际上是针对.Net Framework Core 4.5。

Whilst a number of WinRT APIs are quite similar to the .NET APIs, you cannot directly share class libraries. 虽然许多WinRT API与.NET API非常相似,但您无法直接共享类库。 This is the same situation with WPF, Silverlight and Silverlight for Windows Phone, where the APIs are similar but class libraries are not interchangeable. 这与WPF,Silverlight和Silverlight for Windows Phone的情况相同,其中API类似但类库不可互换。 You can however target these three platforms if you use the Portable Class Library (PCL). 但是,如果使用可移植类库 (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. 我想PCL可能会在将来支持WinRT,但是,我相信它会像XBox360一样支持,只有核心库可以共享。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM