.NET Framework dependency

前端 未结 15 1472
Happy的楠姐
Happy的楠姐 2020-12-19 13:43

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 applicati

相关标签:
15条回答
  • 2020-12-19 14:15

    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).

    0 讨论(0)
  • 2020-12-19 14:16

    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

    0 讨论(0)
  • 2020-12-19 14:17

    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.

    0 讨论(0)
  • 2020-12-19 14:20

    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

    0 讨论(0)
  • 2020-12-19 14:22

    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.

    0 讨论(0)
  • 2020-12-19 14:24

    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.

    0 讨论(0)
提交回复
热议问题