views:

1030

answers:

15

When developing a desktop application in .NET, is it possible to not require the .NET Framework? Is developing software in .NET a preferred way to develop desktop applications? What is the most used programming language that software companies use to develop desktop applications?

Is the requirement of the .NET Framework just assumed based on the Windows OS you have installed hence why they list Windows OS version requirements?

+2  A: 

You can't run a .Net app without the .Net framework. The framework takes care of some of the more tedious background tasks so you couldn't run the app without the framework.

Keng
A: 

It is possible not to require the .NET Framework; there are some companies that sell (for thousands of dollars, mind you) solutions that will allow you to do this. These are complete hacks, however, and not supported by Microsoft.

How you develop desktop applications (ie, using .NET or not) depends on your requirement. There isn't a preferred way.

Most used language is probably C#.

DannySmurf
I wonder why this got voted down, while it is the correct answer.
chrissie1
+2  A: 

On the Windows platform using .NET is the preferred way to develop desktop applications. The WinForms model of .NET is one way to develop traditional or thick client apps, with Windows Presentation Foundation of .NET being the latest technology direction from MS.

Adam
+7  A: 

You can still develop applications for the windows desktop using C/C++, eliminating the requirement to the .NET framework, but you'll need to make sure the necessary libraries are already on the system or installed.

The nice thing about the .NET framework is that Windows XP SP2 and Vista has the 3.0 framework runtime installed by default.

In a lot of ways, this is Microsoft's "development standard" and has been that way for a while. This allows you to not worry about having a bunch of libraries tacked onto your application. If you're sticking to all of the .NET provided libraries, you wind up only have to worry about deploying your executable, which is a big headache reliever. When you have a bunch of libraries you have to deploy as well, then you start to run into hassles when you write updates, because you have to make sure those updates are pushed out in your existing installer and to all the existing installed apps out there.

As for "preferred", that always tends to ruffle feathers at times, but there are more and more .NET developers wanted for the web and the desktop at the job hunt sites I tend to visit. 8^D

EDIT: Many thanks to Orion for pointing out my confusion on the frameworks. You get 3.0 "out the gate if you're on XP SP2 or Vista. Everything else is going to require a simple download or run of Windows Update.

Dillie-O
+1  A: 

I guess what I'm trying to say is that when I look at system requirements for certain software I rarely ever see the .NET Framework as being a requirement. So, I always wonder how they get by without it being a requirement (if they developed the software in .NET). So, I just assume that most commercial software is not written in .NET so that's why I'm asking this question. Hope that cleared some things up.

Bryan Roth
+1  A: 

Mono Has a Windows release, if you absolutely have to avoid dependency on .NET.

Any way you look at it, though, you are going to need a .NET compatible runtime on any computer that your application is running on. So if you want to completely avoid .NET, you will probably have to distribute the Mono runtime along with your application.

+1  A: 

The best practice for .NET application distribution is that the installer is somehow bootstrapped with the .NET Redistributable installer for the required framework, so that if the required framework is not yet installed (say, you need 3.5 in Windows XP) then the installer will just put it in.

The .NET Runtime is small enough an installation that this feasible (it's around 24MB for .NET 2.0, haven't checked how big .NET 3.5 is).

Jon Limjap
+1  A: 

I guess what I'm trying to say is that when I look at system requirements for certain software I rarely ever see the .NET Framework as being a requirement. So, I always wonder how they get by without it being a requirement (if they developed the software in .NET). So, I just assume that most commercial software is not written in .NET so that's why I'm asking this question. Hope that cleared some things up.

I don't have any numbers, but I'm going to guess that since the majority of folks out there are running XP and Vista on their desktops, listing the .NET framework is moot, especially if they are targeting the 2.0 framework in the application itself. Back in the day, how many applications did you see that said "requires vbrun50.dll" or something to that regard since it was put into the Windows installs by default?

Plus it is a little less "scary" for those that aren't terribly computer saavy. All they want to do is download, install, and run the app. A couple of the apps I have out there require the 2.0 framework and I do get some folks asking what is that and how do I get it and does it cost me anything? The typical answer I give them is "If you're running XP or Vista, there's nothing to worry about" and they seem to like that.

Dillie-O
A: 

I did some programming in .NET (using C#) and I realized that often times I craved more control over a number of the Controls. These required knowledge that extended beyond the .NET framework.

For example when I was working with the WebBrowser control to produce an automated testing tool for web applications, I realized that there are certain situations which required event handlers from the lower-level axWebBrowser ActiveX control and documentation was scarce/code samples incorporated a lot of COM Interop concepts. So perhaps having some knowledge on COM could come in useful?

quekshuy
A: 

I guess what I'm trying to say is that when I look at system requirements for certain software I rarely ever see the .NET Framework as being a requirement. So, I always wonder how they get by without it being a requirement (if they developed the software in .NET). So, I just assume that most commercial software is not written in .NET so that's why I'm asking this question. Hope that cleared some things up.

Many applications developed with C++/MFC for Windows desktops require a specific version of the MFC runtime DLLs even though it may not be explicitly listed as a requirement. I believe the same is becoming true with applications requiring .NET.

For example, the application I work on ships with redistributable files for both .NET and the particular version of MFC that we require as well as a number of other required components. Our install program will install any components not currently installed on the users system. Every release over the past several years has used more .NET code than the previous release.

I do not think it is accurate to assume that most commercial software does not use .NET just because its not listed as a requirement. I don't think you can accurately assume anything from that.

Brian Ensink
+1  A: 

I think if you were able to do something like staticly link the .NET framework so you didn't have to develop it then you would be in breach of the EULA that microsoft supplies!

It's the price we have to pay for having such a rich developer experience! It's worth it when you consider the difficulty of going back to MFC programming!

Campbell
A: 

The nice thing about the .NET framework is that Windows XP has the 2.0 framework runtime library installed by default

Since when? I've had to tell lots of our windows XP users to install it. Yes you can pull it down through windows update, but I'm pretty confident it's an optional install and not something that happens automatically.

and Vista has 3.5 installed

No, it has 3.0 installed. You get WPF, but you don't get linq

Orion Edwards
A: 

Thanks for the clarification Orion. I had things confused a bit. I've updated things accordingly.

Dillie-O
+1  A: 

Remotesoft offers a linker - $1250 for a single developer license: http://www.remotesoft.com/linker/index.html

If your application will run on Mono (and Mono's Winform desktop support is pretty good now), you can package your app as a Mono bundle, which is a single executable. There are two options - the default includes the runtime but doesn't static link to it, the other staticly links you to the Mono runtime. The reason you might not want to static link is that it would put your application under the LGPL; bundles that aren't static linked (still just a single exe) don't have that requirement. http://www.mono-project.com/Mono:Runtime#Bundles

Jon Galloway
+1  A: 

You might consider using "ClickOnce Deployment", which makes it very easy to add bootstrapping the .Net 2.0, 3.0, and/or 3.5 redistributable installers into your application. Just click a checkbox in your project's properties and your installer will automatically detect whether the pre-requisite framework has been installed and will install it if not.

It's not suitable for every situation but if you can take advantage of it it can be pretty slick.

Wedge