Windows RT 和 c# [英] Windows RT and c#

查看:19
本文介绍了Windows RT 和 c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用 C# 和 XAML 开发 Metro 风格的应用程序,它必须在 Windows RT 设备和完整的 Windows 8 操作系统上运行.所以我被允许只使用 WinRT 而没有任何 .net 框架程序集.我读过这个问题

I need to develop Metro style application using C# and XAML which has to work on Windows RT devices and full Windows 8 OS. So I'm allowed to use only WinRT without any .net framework assemblies. I've read this question

Microsoft Surface 平板电脑:为两种设备编写应用程序?

这个非常有用的帖子:http://blogs.msdn.com/b/jasonz/archive/2012/06/12/what-you-need-to-know-about-developing-for-windows-on-arm-woa.aspx,但我仍有疑问:当我什至创建一个空白 Metro Style Application 项目时,我有 Metro 风格的 .NET 组件.我是自己删除了它们还是我做错了什么?如果需要使用移植到 WinRT 或 mvvvm light 之类的 Prism fw,我应该怎么做?他们是否允许我仅在本机 WinRT 上开发 WOA 应用程序?这些时刻对我来说并不清楚.

and this very usefull post: http://blogs.msdn.com/b/jasonz/archive/2012/06/12/what-you-need-to-know-about-developing-for-windows-on-arm-woa.aspx, but i stil have question: When i even create a Blank Metro Style Application project I have .NET asseblies for metro style. Do I have remove them by myself or i do something wrong? And what i should do if need to use something like Prism fw ported to WinRT or mvvvm light? Are they allow me to develop application for WOA only on native WinRT? These moments are not clear for me.

你能解释一下 Windows RT 和 Windows on ARM 的区别吗?我是否只需要使用 WinRT(没有 .net)来开发 WindowsRT 操作系统?

Can you explain my what the difference between Windows RT and Windows on ARM Do i need to use only WinRT (without .net) to develop for WindowsRT OS?

希望你能帮助我.

推荐答案

让我用最直接的方式回答你.如果您打开一个空白 XAML/C# Windows 应用商店项目.该项目将在 Windows RT (ARM) 和 Windows 8 (x86/x64) 上运行.那是因为它是为实现这一目标而构建的.仅仅因为您拥有 .Net Framework 的感觉,不用担心 - 您正在编写一个跨平台的应用程序.

Let me answer you in the most direct way I can. If you open a Blank XAML/C# Windows Store project. That project will run on Windows RT (ARM) and Windows 8 (x86/x64). That's because it is built to accomplish this. Just because you have what feels like the .Net Framework, don't worry - you are writing a cross-platform application.

现在,请注意.由于 C#,您使这个答案变得容易.CPP 开发人员没有相同的保证,因为他们可以做一些编码来破坏这种兼容性.在 C# 中并非如此.如果您编写的代码编译为任何 CPU",那么我所说的是正确的.

Now, for the caveats. You made this answer easy because of C#. CPP developers don't have the same guarantee because there are coding things they can do to break this compatibility. Not so in C#. If the code you write compiles to "Any CPU" then what I am saying is correct.

如果您引入需要构建从任何 CPU"更改为其他内容的内容(例如 Bing 地图控件).Windows 应用商店将允许您以相同的名称提交应用的三个版本 - 每个平台一个版本 - 用户永远不会知道有多个版本.

If you introduce something (like the Bing Maps control) that requires your build to change from "Any CPU" to something else. The Windows Store will let you submit three versions of your app under the same name - one for each platform - and the user will never know there is more than one.

在最后一个示例中,您仍然支持每个平台,您只需要指定三个不同的构建来完成它 - 您的代码可能根本不会改变!在大多数情况下,您都支持它们.如果你引入了第三方库——比如 MVVMlite——如果你可以构建到任何 CPU,你仍然可以.大多数图书馆都是这样的.

In that last example, you are still supporting every platform, you just have to specific three different builds to accomplish it – your code may not change at all! In most scenarios, you support them all out of the gate. If you introduce a third party library - like MVVMlite - you are still okay if you can build to any CPU. Most libraries are cool like that.

这篇关于Windows RT 和 c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆