So I made an application for a client in VB.net using Visual Studio 2017. Sadly, it requires Microsoft .NET Framework, and even though I used .NET Framework 2.0, it does not come preinstalled with any version of Windows, not even the latest version of Windows 10.
So I was wondering how are applications (such as CCleaner, Chrome, Firefox) made which do not require any prerequisites such as .NET Framework or Visual C++. Which language and compiler do they use?
I would like to recode my application in it so that it suffices my client's requirements.
My real and only question is how do I make application with the default libraries available in Windows 7 and above.
Every operating system provides a set of functions you can call and libraries you can use, that are effectively guaranteed to be present. No installation of .NET or Visual Studio redistributables or that sort of thing.
On Windows, it's known as the Win32 API. It's awkward and painful (which is why there are so many frameworks available to take care of all that for you), but it's certainly something you can use.
the .net framework is effectively part of the OS now; most machines since about 2010 have it.
You can use static linkage to ensure nothing needs to be installed. Release versions don't need visual to be installed, but debug compiles DO need the debug libraries. You should not ship with debug libraries linked in.
Between static linkage and debug off, you should be able to produce a program that does not need anything extra installed. IIRC turning off managed code will get rid of some (most?) of the hooks into .net framework, but using gui stuff will pull some of that back in.
The problem with .NET is that the older version like 2.0 are not longer installed or the new versions are not yet installed.
With C++ you can actually create a self contained .exe. You just need to compile and link the runtime and other libraries statically. That is what I do. If you do not have any references to .NET it will not be used.