20

After the WinRT presentation, I'm confused about the role of the .net framework in the Microsoft development stack.

Is it necessary for developing WinRT applications?

2 Answers 2

13

As I understand it you can build a WinRT app in 3 ways

  • .net
  • jscript
  • unmanged C++

The WinRT "object" are ref counted like COM was, however they have good meta data so .net can make them look like .net objects. (likewise jscript can make them look like jscipt objects)

So .net is not necessary to develop WinRT applications if you wish to use jscript or C++.

Sign up to request clarification or add additional context in comments.

3 Comments

I don't think .NET in the normal sense is used when choosing to write an WinRT app in C# or VB. The code isn't managed in the .NET sense, but managed by the OS.
@tronda, the C# or VB.NET code runs inside the managed .NET virtual machine just like usual. Where it interfaces with WinRT objects, it basically treats them as COM objects using COM interop (though a much-enhanced COM interop that lets you do things like descend from WinRT objects).
I just heart from the new PluralSight training that WinRT can be programmed in C# management code. But it's not .Net and don't have the Task class but something similar.
2

If you are developing a Windows 8 Metro style application, then you will be using WinRT whether you choose to use HTML5/JS, Xaml or C++. Note that C#/VB.NET and Xaml in Metro apps only expose a subset of the .NET Framework. WinRT provides a sort of sandboxed environment for the apps.

If you are developing "classic" Desktop Applications, then you'll likely use the .NET Framework and its full awesomeness.

They really are two different platforms for building two different kind of apps. WinRT for fully imersive apps that can utilize touch and other sensors. And .NET for any other application you want to build. Remember that you can still utilize touch (and most likely the other sensor API's as well) within any .NET application.

4 Comments

Can you use the WinRT API in a non Metro-style application?
Ok, but .net framework is always necessary for build winrt application?
@Justin Yes, but not all parts of it. Specifically, not UI, or stuff related to app sandbox (isolated storage etc). You can write a console application using Windows.Networking though, for example.
@A.DIMO No, .NET Framework is not necessary, neither to build nor to run WinRT apps written in C++ or JS. WinRT itself is native.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.