• 0

Deploy .NET w/o the Framework


Question

Just thought I would post this, as the app/methods employed are pretty interesting for .NET devs. The samples on the page are interesting, as well.

Salamander .NET Linker and Mini-Deployment Tool

Salamander .NET Linker and mini-deployment tool allows you to link .NET assemblies together into a single file, and to deploy your application without installation of the whole Microsoft .NET Framework. The linker selectively links MSIL code putting together only the required classes and methods, and it is capable of linking into the Microsoft .NET framework class libraries. The mini-deployment tool then builds a minimum set of the Microsoft .NET runtime to ship with your application. This usually results in installation size of a few mega bytes, rather than tens of mega bytes, and the installation takes much less time without rebooting machines. The mini-deployed application can be launched directly from a CD, absolutely without copying files or adding registry entries.
The mini-deployment tool puts together the minimum set of CLR runtime files and dependent assemblies that can be simply copied to a single folder on a target machine, and your application runs as if the whole framework is installed. Since the installation is isolated into a single folder, there will be no conflicts with future .NET installation. When linking is used for the dependent assemblies, it will further reduce the file size.
Link to comment
https://www.neowin.net/forum/topic/210209-deploy-net-wo-the-framework/
Share on other sites

Recommended Posts

  • 0

I am not endorsing it...I was just pointing out that the idea is interesting (decoupling only the needed portions of the framework). It would be nice to see an open source version of a product such as this.

Actually, it would be neat to see a VS compiler option for this, but I can pretty much bet that will not happen ;).

  • 0

OK, stop for a second and think. What about the people who do have the framework installed already? :huh: For them, your app is extremely large, and with each service pack to the framework, you have to issue a new update, because the service pack they install doesn't affect your program.

There are other reasons not to do this too, but everyone is so hellbent on using C#/VB.NET without the framework (for reasons I cannot fathom) that they don't see them :wacko:

  • 0
but everyone is so hellbent on using C#/VB.NET without the framework (for reasons I cannot fathom) that they don't see them :wacko:

Really. You'd think they'd realize that the .NET framework is just a very nice set of libraries that make the lives of programmers much easier.

  • 0
There are other reasons not to do this too, but everyone is so hellbent on using C#/VB.NET without the framework (for reasons I cannot fathom) that they don't see them :wacko:

A couple of reasons for that (admittedly, I WAS one of those people at one time, but my own experience distributing a .NET application has given me an attitude adjustment). First, they think that it will decrease the amount of downloading that their users will have to do (Untrue. A WinForms app would require about 16MB of the 20MB Framework).

Second, there's a stigma attached to .NET. Amateurs think that if they don't have to say that their app requires .NET, people will be more likely to download it. That's not actually their real problem; it's just their perspective on their problem. The actual problem is that they just haven't written something good enough to warrant a 20MB prerequisite download (if you write something that people want and make it good, they will download whatever requirements are necessary to run it).

  • 0
A couple of reasons for that (admittedly, I WAS one of those people at one time, but my own experience distributing a .NET application has given me an attitude adjustment). First, they think that it will decrease the amount of downloading that their users will have to do (Untrue. A WinForms app would require about 16MB of the 20MB Framework).

Second, there's a stigma attached to .NET. Amateurs think that if they don't have to say that their app requires .NET, people will be more likely to download it. That's not actually their real problem; it's just their perspective on their problem. The actual problem is that they just haven't written something good enough to warrant a 20MB prerequisite download (if you write something that people want and make it good, they will download whatever requirements are necessary to run it).

While I tend to agree with these observations, there are also some valid reasons why this could be good.

As you alluded to:

There are still many low-end machines that are not suitable for .NET framework installation, and some users may not be willing to install the framework at all, this tool helps you to reach more customers as it silently deploys a trimmed down version of the framework without any noticeable effects and conflicts. The framework appears as an integrated part of your own application.
I think there is a lot to be said by that. I think some people hear "Requires the .NET Framework" and immediately get turned off, as ridiculous as it may be (Thinstall claims "~6MB for a typical GUI application"). If you can get past the marketing speak, I think they bring up some valid points here (although a little dramatized in some places, ie "3700% less space" ;)):
1. The .NET Framework adds more that 20MB to your application download. How many users are you losing because of the extra 1-3 hours of modem download time?

Thinstall creates a stand-alone application that runs without the .NET Framework in as small as 2.7MB for a simple Hello World, and ~6MB for a typical GUI application.

2. The installed size of the .NET Framework is more than 100MB. How many users will decide to uninstall your application because it takes up too much space?

Thinstall runs .NET EXEs without decompressing any files to disk, so the download size and install are exactly the same. i.e. 2.7MB versus 100MB, or 3700% less space.

3. Users are afraid of installing the .NET Framework. Users have a short attention span, don't waste time trying to convince them they need to install 2 things to run your application. When you have the user's attention, sell them on your application, not on why they need the .NET Framework.

Thinstall combines your program with the required portions of the .NET Framework to form a single EXE that runs without installation. No files are extracted/installed to the hard drive, the application can be run directly from CDROM or Internet download link.

4. The .NET Framework install requires registry write access and is not possible for Guest accounts on 2k/xp. Guest accounts are very common in large corporate and educational institutions. Guest users cannot evaluate your software for purchase without contacting the IT department, which leads to lost sales.

Thinstall allows .NET applications to run without registry permissions on all windows Accounts.

5. The .NET Framework install fails on more than 1% of computers because the user's computer is "broken" from previous installers or viruses. It's not your job to trouble shoot why the .NET Framework installer isn't working!

With zero installation, Thinstall runs .NET applications on PCs with corrupted registries, missing DLLs, broken MSI, etc.

6. Your application may not be compatible with newer or older versions of .NET Framework. Don't waste your time tracking down bugs that aren't your fault.

Thinstall links a specific version of the .NET Framework with your application, so it runs exactly the same every time.

Are you worried about lost sales from hackers removing licensing code from your .NET application?

1. Even with obfuscators applied, .NET applications can be perfectly disassembled and reassembled.

This makes it very easy for any programmer to find your license code and remove it. Once a "crack" for your application is released on the net you can stop it. Don't wait until it's too late.

Thinstall hides your .NET "byte-code" from all external disassemblers and hacking tools.

  • 0

Oh nice, first of all bump your executable by 5-10megs of size, and then just convince your computer to throw memory out of the window, if you'll be running multiple applications packed that way. Sure.

Either make your users download the framework, or lets just wait for Longhorn instead.

  • 0
Tom Servo,Aug 29 2004, 12:06]Oh nice, first of all bump your executable by 5-10megs of size, and then just convince your computer to throw memory out of the window, if you'll be running multiple applications packed that way. Sure.

Bah, who doesn't like throwing away memory? :p

Either make your users download the framework, or lets just wait for Longhorn instead.

:) Nice Sig, btw

  • 0

Something like that Thinstall tool might be useful in theory. But complex applications (which yours would have to qualify as if you're willing to spend $1500 on a .NET linker/obfuscator for it) are not distributed as single EXEs for perfectly good reasons, which is exactly what the Thinstall tool appears to do.

And as was already said, you can't apply a .NET service pack to an application that's been linked like this. If Microsoft ever has to release a critical patch for the Framework (say, because there's a buffer overflow in System.String), you are S-C-R-E-W-E-D. You'd have to redistribute your entire application to fix that. Which means a new round of testing to find out if the patch broke anything, then convincing all of your users to re-download the entire thing, possibly an at-your-own-cost mailing of new CDs to users if you're distributing that way (which could cost you a bloody fortune), and/or loss of future sales because you're selling something with security holes that can't be easily patched.

These tools just aren't worth the potential hassle. Distributing the Framework is safer, easier, and MUCH less expensive.

  • 0

2. The installed size of the .NET Framework is more than 100MB. How many users will decide to uninstall your application because it takes up too much space?

The .NET Framework is about that size, your app isnt, it doesnt install the .net framework every time you install a app, it only installs once, it doest add the 100 or so MB to the app in the Add/Remove programs list, so that's not a valid statement.

  • 0

The installed size happens only because IL code can be fairly good compressed, plus the framework installer creates NGen'd images of the core libraries, plus add application tracking and what not, that'll use up space slowly.

However can I see the issue here, when someone sees his Framework folder being around 120megs, he can blindly assume that the application needs most of this and would be some memory eating monster. You can witness a similar effect with those task manager eagle eyes, that don't want to understand how the CLR and GC handle system memory allocation.

  • 0
OK, stop for a second and think. What about the people who do have the framework installed already? :huh: For them, your app is extremely large, and with each service pack to the framework, you have to issue a new update, because the service pack they install doesn't affect your program.

There are other reasons not to do this too, but everyone is so hellbent on using C#/VB.NET without the framework (for reasons I cannot fathom) that they don't see them :wacko:

Have you ever programmed in the real world?

If you have to distrubute a 20MB .NET framework with your app, which most users won't have (most users use 98, 2000 or XP without SP atm), over a dialup or ISDN connection, people will just not choose it. You have lost a sale.

Even if you have an internet deployment, most big places don't have the .NET framework installed.

1) Security: it's just introducing more holes into Windows.

2) More problems. .NET framework can horribly mess up a Windows install if you have problems with it - I've seen it plenty of times.

3) The fact you will have to keep upgrading it. They should of made a .NET framework 1.0, and kept with it. Sorted every bug and put any additional functionality they need in the app, instead of the framework. I know that many programmers just won't bother with .NET now, becuase if you want to take advantage of new VS stuff then you have to keep everyone uptodate on the huge .NET install.

4) Time. .NET framework can take ages on an old machine, and that means getting it booked into the workshop, transporting it around, having a tech watch over it... not only that, you have just took a working machine out of someone's office which means they may not be able to do a days work. If you have 1,000 machines all like that (running Win2000 for example), and you need to check each of them work fine after the install, you are looking at a couple of million dollars lost in work time.

Now do you guys get why no-one is taking up .NET and just using webapps? Whereas we used to 'recommend' custom wrote VB apps for businesses, we now give them a server, with Linux, Apache, mySQL and PHP installed - along with our custom web app we wrote for them, with a tape driver for automatic backups of the database, and usually roll out Firefox (we certainly will be pushing for this far more when it hits 1.0 or soon after) for security reasons. If it breaks, we SSH into the box, reboot if needed (or database restore - but we haven't needed to do this yet), and it's back up running within 5 minutes. Before, we'd have to goto the site, find where the files were stored, try and see what went wrong and it was a pain in the ass.

Upgrades are really easy too, we just overwrite the files at midnight and the new version is rolled out to all clients on the network. The next stage of course is to go to Linux desktops everywhere, which could be done due to the fact you only need a webbrowser, office suite and an exchange compatiable mail client (like Evolution).

I do like a lot of the features in VS.NET though - they could save us a little time. But sadly, for nearly all of what we do, 'rich client apps' are so passe. They have too many issues.

  • 0
Have you ever programmed in the real world?

If you have to distrubute a 20MB .NET framework with your app, which most users won't have (most users use 98, 2000 or XP without SP atm), over a dialup or ISDN connection, people will just not choose it. You have lost a sale.

Even if you have an internet deployment, most big places don't have the .NET framework installed.

1) Security: it's just introducing more holes into Windows.

2) More problems. .NET framework can horribly mess up a Windows install if you have problems with it - I've seen it plenty of times.

3) The fact you will have to keep upgrading it. They should of made a .NET framework 1.0, and kept with it. Sorted every bug and put any additional functionality they need in the app, instead of the framework. I know that many programmers just won't bother with .NET now, becuase if you want to take advantage of new VS stuff then you have to keep everyone uptodate on the huge .NET install.

4) Time. .NET framework can take ages on an old machine, and that means getting it booked into the workshop, transporting it around, having a tech watch over it... not only that, you have just took a working machine out of someone's office which means they may not be able to do a days work. If you have 1,000 machines all like that (running Win2000 for example), and you need to check each of them work fine after the install, you are looking at a couple of million dollars lost in work time.

Now do you guys get why no-one is taking up .NET and just using webapps? Whereas we used to 'recommend' custom wrote VB apps for businesses, we now give them a server, with Linux, Apache, mySQL and PHP installed - along with our custom web app we wrote for them, with a tape driver for automatic backups of the database, and usually roll out Firefox (we certainly will be pushing for this far more when it hits 1.0 or soon after) for security reasons. If it breaks, we SSH into the box, reboot if needed (or database restore - but we haven't needed to do this yet), and it's back up running within 5 minutes. Before, we'd have to goto the site, find where the files were stored, try and see what went wrong and it was a pain in the ass.

Upgrades are really easy too, we just overwrite the files at midnight and the new version is rolled out to all clients on the network. The next stage of course is to go to Linux desktops everywhere, which could be done due to the fact you only need a webbrowser, office suite and an exchange compatiable mail client (like Evolution).

I do like a lot of the features in VS.NET though - they could save us a little time. But sadly, for nearly all of what we do, 'rich client apps' are so passe. They have too many issues.

Heh, something tells me you don't care much for Java either. ;)

  • 0
1) Security: it's just introducing more holes into Windows.

Care to back THAT claim up?

2) More problems. .NET framework can horribly mess up a Windows install if you have problems with it - I've seen it plenty of times.

The .NET installer doesn't touch anything of the existing Windows installation, only a few registry keys. The rest is selfcontained in the %SystemRoot%\Microsoft.NET folder.

  • 0

Hi Guys,

Just found this interesting discussion and wanted to add a few comments.

>>1) Security: it's just introducing more holes into Windows.

>Care to back THAT claim up

When .NET is installed it allows .NET code to be run on from Internet Explorer with restricted security settings (just like Java applets). Right now there are no know security holes in this senerio, but it's very easy to imagine hackers will find several over the lifetime of .NET. So by installing the real .NET Framework you are potentially opening yourself up to risk that you wouldn't have if it weren't installed. This is one reason many enterprise customers refuse to install .NET on their PCs.

> The .NET installer doesn't touch anything of the existing Windows installation, only a few registry keys. The rest is selfcontained in the %SystemRoot%\Microsoft.NET folder

The .NET Installer writes thousands of registry keys and places many files in c:\windows, c:\windows\system32, as will as %system%\microsoft.net\framework. It also creates a new Global Assembly cache (c:\windows\assembly). It upgrades DLLs and for Windows 98/ME it installs device drivers. I know a developer who sells a retail application written in .NET with more than 100,000 copies sold already. Originally he installed the .NET Framework seperately and said that the .NET Framework fails to install on 1% of PCs (1000 machines is a lot of tech support calls). He switched to using Thinstall and doesn't have that issue any more.

  • 0

The amount of files in system32 is negligible, just the few DLLs required to fire up the CLR. The registry keys are CLSIDs pointing to the class libraries. Registry keys don't do any harm at all.

And regards the security implications, managed code running in the IE security zone has almost no rights. It can't do jack. And for that matter, have you ever tried to run .NET bits as applets in a webpage? I tried, and it's a pain in the ass and almost not doable. Running WinForms applications from IE? Tight ass permission set applies. No issue here.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • State of Decay 2, Blasphemous 2, and more join Xbox Free Play Days by Pulasthi Ariyasinghe The latest Free Play Days offer has just kicked off, giving Xbox players the chance to try out a new selection of games over the weekend. The offerings this time aren't as massive as last weekend, but there are still major releases for Xbox players to jump into. This includes Undead Labs' post-apocalyptic title State of Decay 2, as well as two Team17-published titles. Two of the games being offered this time are available to all Xbox players without needing any kind of Game Pass subscription. In the fully free-to-play section, you can jump into State of Decay 2. The title is both an action survival title and a community builder, letting players choose a map, set up their base, and try to keep the growing zombie threat at bay. Cooperative play is available too. Don't forget that the studio is preparing a third entry for 2027. Next, Blasphemous 2 drops in for Metroidvania and Soulslike fans, where The Penitent One returns for another adventure. The title has tough combat with multiple weapon options, deadly traps to avoid, and platforming sequences requiring a lot of patience and timing. Keep in mind though that the offer does have a 5-hour time limit attached to it. Lastly, Xbox Game Pass Ultimate, Premium, and Essential members can now try out the WWII-set first-person shooter Hell Let Loose. The multiplayer game offers 50 vs 50 combat in massive maps, with infantry, tank, and artillery options available for players. Here are the announced games and the platforms they are available to play on: Hell Let Loose (Xbox Series X|S, PC) State of Decay 2: Juggernaut Edition (Xbox Series X|S, PC) Blasphemous 2 (Xbox Series X|S, Xbox One) To easily find the titles on Xbox consoles, first head to the Store, and then in the sidebar, find the Home section. In there, open the Subscriptions tab. The Free Play Days collection will show up in this area. This week's Free Play Days promotions will end on Sunday, June 11, at 11:59 pm PT.
    • Can we not have paperless office, like we was promised in the 80's
    • I actually laughed out loud in real life at the heading on this—whatever Microsoft is drinking, I want some of it.
    • Euro-Office must default to ODF to be considered "genuinely European", LibreOffice argues by David Uzondu Euro-Office is a web-based collaborative office suite that positions itself as a "European sovereign alternative" to American tech companies, backed by a coalition of developers including Nextcloud, IONOS, Abilian, BTactic, OpenProject, and, more recently, Tuta. The project officially went live a couple of days ago, but not before drawing heavy fire from LibreOffice developers, who called the marketing claim that Euro-Office represents the "first open-source office suite developed in Europe" a deceptive historical inaccuracy because projects like OpenOffice and LibreOffice existed decades earlier. Now that the project has launched, LibreOffice is back with another complaint, arguing that Euro-Office cannot consider itself "genuinely European" while it pushes proprietary Microsoft defaults on users. Euro-Office had promised to improve the OpenDocument Format (ODF) back in April, but the current release still plagues users with several technical failures. For instance, the suite lacks an admin setting to enforce ODF, and mobile editors completely block ODF saves, forcing files into Microsoft's OOXML formats. Some configurations force files into read-only mode, while editing frequently corrupts document formatting or erases data. LibreOffice thinks that merely supporting a format as an afterthought does not make you a sovereign alternative, as file formats are the battleground where" digital sovereignty is won or lost." The road to the first stable release of Euro-Office has been quite bumpy due to an aggressive public fallout with OnlyOffice, from which the coalition originally forked the project. OnlyOffice struck back by accusing the coalition of violating copyright terms under its AGPLv3 branding requirements by stripping the original branding anyway and forking the code. Getting Euro-Office up and running is a bit wonky (at least for non-technical users), as there is no direct installer to grab off the web. The easiest way we learnt is by using Docker. First, pull the official Euro-Office image from the GitHub Container Registry: docker pull ghcr.io/euro-office/documentserver:latest Then, run the container with active ports and a secure JWT token, enabling the test environment: docker run -i -t -d -p 8080:80 --restart=always -e EXAMPLE_ENABLED=true -e JWT_SECRET=my_secure_jwt_secret ghcr.io/euro-office/documentserver:latest And finally, open a web browser and go to the following address: http://localhost:8080 If you are running this on a remote server, replace localhost with your server's IP address. You will see the Euro-Office test page, where you can create new text documents, spreadsheets, or presentations directly in the browser. Image via Euro-Office Nextcloud promises that proper standalone desktop versions and mobile apps will arrive in a future release.
  • Recent Achievements

    • Week One Done
      FBSPL earned a badge
      Week One Done
    • One Year In
      Jim Dugan earned a badge
      One Year In
    • One Month Later
      Tommi118 earned a badge
      One Month Later
    • One Month Later
      sjbousquet earned a badge
      One Month Later
    • Week One Done
      sjbousquet earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      486
    2. 2
      PsYcHoKiLLa
      197
    3. 3
      +Edouard
      155
    4. 4
      Steven P.
      83
    5. 5
      ATLien_0
      69
  • Tell a friend

    Love Neowin? Tell a friend!