Live data from Hacker News

Announcing .NET Native Preview

blogs.msdn.com

21–30 of 85 posts

Re: Announcing .NET Native Preview

#21
post #6

What is the difference between this and NGEN? Anybody?

No MDIL. NGEN can still JIT for things like cross domain generics and because it loads non-native code, still needs to optimize at run time. Project N compiles to fully native code, so there can be no JIT, and significantly smarter optimizations can happen since they don't impact performance at runtime.

Thank you.

Re: Announcing .NET Native Preview

#22
post #4

Earlier quoted context omitted.

Sure, but ngen solved that problem years ago: http://msdn.microsoft.com/en-us/library/6t9t5wcf(v=vs.110).a...

So I guess this is ngen in the cloud to skip doing it on the PC.

If I remember ngen is very architecture/platform specific - that is why it has to be done on the target machine. This sounds like it is done ahead of time with support for a variety of architectures.

Re: Announcing .NET Native Preview

#23
post #19

Earlier quoted context omitted.

Damn, that's awesome! For the longest time that was the only thing that really bothered me about writing .NET code.

But doesn't anyone with the Windows Store already have the CLR?

Probably -- I don't care too much about the windows store, I'm more excited about being able to write C# code that doesn't require a VM. Not that there's anything /wrong/ with the CLR, but one thing I miss about C++ when I'm not writing it is self contained programs where it's just a small exe without a bunch of huge dependencies.

Re: Announcing .NET Native Preview

#24
post #19

Earlier quoted context omitted.

But doesn't anyone with the Windows Store already have the CLR?

Probably -- I don't care too much about the windows store, I'm more excited about being able to write C# code that doesn't require a VM. Not that there's anything /wrong/ with the CLR, but one thing I miss about C++ when I'm not writing it is self contained programs where it's just a small exe without a bunch of huge dependencies.

I think you're forgetting about the Visual C++ 20xx Redistributables. They aren't exactly tiny. https://www.dropbox.com/s/eizfqwg0ouiq4ql/Capture3.PNG

vs. the latest .NET install

https://www.dropbox.com/s/eizfqwg0ouiq4ql/Capture4.PNG

This is a brand new Windows 8.1 computer.

Re: Announcing .NET Native Preview

#25
post #13

Earlier quoted context omitted.

Yeah I don't understand the need to get rid of a .NET framework dependency though. This only supports building Windows store apps, which only run on devices that have the .NET framework right now...

One admittedly crazy theory is that this is laying the groundwork for building iOS apps and therefore would compete with Xamarin. Any kind of JIT would not be allowed on the iOS app store.

[deleted]

Re: Announcing .NET Native Preview

#27
post #2

I'm kind of scratching my head here, can someone explain what problem this solves? There's already a CLR and already a way to build native apps for Win 8, etc. This is a new CLR that can run new 'native' apps?

It gives faster startup time (due to AOT compilation rather than JIT), and doesn't require that the .NET framework be installed. Possibly better runtime performance, but I wouldn't expect huge gains there. P/Invoke should have lower overhead, which may be highly relevant for some things. I suspect that there's things that require this which they haven't announced yet, since on its own it seems like something kinda ni…

Start up times could be a big deal to compete with iOS? Especially in similar app lifecycle models where apps could be stopped and restarted implicitly by the OS?

Re: Announcing .NET Native Preview

#28

Earlier quoted context omitted.

Probably -- I don't care too much about the windows store, I'm more excited about being able to write C# code that doesn't require a VM. Not that there's anything /wrong/ with the CLR, but one thing I miss about C++ when I'm not writing it is self contained programs where it's just a small exe without a bunch of huge dependencies.

I think you're forgetting about the Visual C++ 20xx Redistributables. They aren't exactly tiny. https://www.dropbox.com/s/eizfqwg0ouiq4ql/Capture3.PNG vs. the latest .NET install https://www.dropbox.com/s/eizfqwg0ouiq4ql/Capture4.PNG This is a brand new Windows 8.1 computer.

The redistributable is huge but not required. You can statically link the C runtime. That option has never been available for C#, and IMHO it's the single biggest reason C# failed to replace C++ for Windows client development.

Re: Announcing .NET Native Preview

#29

So, uh, can I compile my C# app to an bare x64 .exe file, statically linked with no runtime dependency on the .NET Framework, that will run on Windows 7 and 8? Or not? Edit: This is a much better link: http://msdn.microsoft.com/en-US/vstudio/dn642499.aspx Still not sure though, as they say "only Windows Store apps can be created" which sounds suspiciously like "no".

From the original link they say "Today's preview supports Windows Store applications. We will continue to evolve and improve native compilation for the range of .NET applications." which suggests to me that it might be on the radar. However the scope of Windows desktop or server applications is obviously much broader, so it might be a harder problem to solve there.

Re: Announcing .NET Native Preview

#30

So, uh, can I compile my C# app to an bare x64 .exe file, statically linked with no runtime dependency on the .NET Framework, that will run on Windows 7 and 8? Or not? Edit: This is a much better link: http://msdn.microsoft.com/en-US/vstudio/dn642499.aspx Still not sure though, as they say "only Windows Store apps can be created" which sounds suspiciously like "no".

It sounds like that's the plan (from your link):

"However, apps will get deployed on end-user devices as fully self-contained natively compiled code (when .NET Native enters production), and will not have a dependency on the .NET Framework on the target device/machine."

Post reply on HN