是否.NET 4.0 API业务的工作与Win 8应用程序新城?(Does .NET 4.0 bus

2019-10-16 19:05发布

我们有一个庞大的企业的API /在.NET 4.0中(其中大部分都是从.NET 2.0升级)开发的组件集。 他们目前尚未公开为Web服务。

我们想先根据这些API的运8 Metro应用开发(使用C#/ XAML)。 可能吗?

Answer 1:

另一种选择是针对便携式类库(PLC)

http://msdn.microsoft.com/en-us/library/gg597391.aspx

这样,您就可以编译单个组件的多目标正常.NET和城域/ WinRT的.NET。

当然,你将不得不编写到一个暴露在两个框架的API的子集。



Answer 2:

It may be the case that your classes can be used in a Metro style app, but it's unlikely. The full .NET Framework is not exposed to a Metro style app. It's actually a subset of the .NET Framework called the Core Profile. You can see the Core Profile reference assemblies with ILDasm or ILSpy at ...

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\

Check out A .NET developer's view of Windows 8 app development from Build for a discussion of the .NET Profile for Metro style apps.



Answer 3:

你可以使用他们,如果你可以重新编译他们作为WinRT的类库。 最有可能的,这意味着没有和你需要先升级他们使用的WinRT API的,无论你使用WinAPI的或在此之前,一些.NET库并没有转移到WinRT的。



Answer 4:

我想现在事情的方式是SaaS的/云解决方案。

你最好的选择可能是公开这些组件为Web服务,并从您的应用程序访问这些服务。

当然,这是假设你没有大量的数据来回。

在这种情况下,你应该能够包括重新编译为WinRT的类库...虽然我不鼓励它,因为它可以让你在开发相当大的规模的应用程序的组件。



文章来源: Does .NET 4.0 business API's work with Win 8 Metro Apps?