I am writing an app to discover what features exist on a pc. The user would go to a web page, download the app and execute it (with all the appropriate warnings, this is not spyware). The app would use the standard MS api to determine such things as connection speed, installed memory, firewall health, etc. Writing the app is not a problem, I could use Scripting Host, C#, C++, etc. The question is, if I chose C# is there any guarantee that a certain flavor of windows would have .net installed? The target pc is XP SP2 or better and Vista.
Thanks for the help.
Vista does have .NET 3.0 installed. XP SP2 doesn't have any .NET framework installed by default.
You may want to read Scott Hanselman's blog post SmallestDotNet: On the Size of the .NET Framework, specifically the What's the "Client Profile?" section:
The Client Profile is an even smaller
install option for .NET 3.5 SP1 on XP.
It's small 277k bootstrapper. When
it's run on a Windows XP SP2 machines
with no .NET Framework installed, it
will download a 28 meg payload and
give you a client-specific subset of
.NET 3.5. If the Client Profile
bootstrapper is run on a machine with
any version of .NET on it, it'll act
the same as the 3.5 SP1 web installer
and detect what it needs to download,
then go get it. There's more details
in the Client Profile Deployment Guide.
Mehrdad has it right, SP2 has no .NET installation by default. It's worth noting, however, that you can provide a download for users who lack the runtimes, providing whatever version you are using bundled in. It's an option through the creation wizard of one of the setup packages.
Like the above have stated, .NET is not installed by default. However if you were using ASP .NET with C#, many things could be gotten just by viewing the website (computer name, domain, userid, etc).
Well if you are afraid of use .Net but the client does not have installed, you could try a product which takes all your .Net dependencies and creates an isolated installer that will run on every computer, with all the risks that this could raise to your users (no updates, no bug fixes and such).
Here is the link:
http://www.remotesoft.com/linker/index.html
Hope this helps.
I would suggest avoiding .NET if possible since most versions of Windows come without it and the installer will just add to the pain of using your program. Unless its a large application already... but from the sound of it you can get what you want with a few KB's of C++ executable (i.e. almost instant download).
Pre-Vista: there is a significant chance that .NET will not be installed. And event if it is it may be 1.0 or 1.1.
Vista includes .NET 3.0 in RTM, but it is an optional component in Server 2008.
I would also be considered about the size and start up time of .NET. Overall this sounds like something to be written with as few dependencies as possible.
EDIT: Corrected Vista included 3.0 not 3.5.
Related
I know that Windows XP is out of support for a long time now, but we still have customers using machines that they cannot update to a more recent OS.
We now want to write a new application and while there's always the option to go with a statically compiled C++ application, I would like to use C#.
I think that it may be possible to use an older version of Mono together with mkbundle to create such a self-contained application.
I cannot find real information on the subject, namely the last supported version of mono on Windows XP SP2. According to this thread: https://github.com/mono/mono/pull/1723, Mono 4.0.0 should work, but I also found information that says it's 3.2.3 (https://opensourcepack.blogspot.de/p/xp-last-resort_12.html).
Before we start extensive testing, I would like to know if anybody had a similar situation and has another approach or could find real (official) information on the subject?
Edit: We could use the old .NET framework 4.0 which works on XP. But the machines are sometimes very limited in terms of disk space and we cannot always install the .NET framework. This is why I explore other options now.
Thanks,
Knurd
A popular financial software vendor distributes a "private" .NET framework:
What exactly is a private .NET framework?
Why might someone want to have their own, private version of the .NET framework?
In basic terms, how might one go about creating a private .NET framework?
I'm not affiliated with this vendor in any way and thus I obviously can't speak for them about what they mean. With that out of the way...
Their FAQ states the following:
What is the Bloomberg private .NET Framework software?
These software components are only installed if the workstation does not have the corresponding native Microsoft .NET Framework software installed. In the case that both native Microsoft versions (3.5 SP1 and 4) are not present, only the private v3.5 SP1 component will be installed during the initial installation. The installation file (bnetupd.exe) for the private v4 version will be copied to the \blp\wintrv directory for installation at a later date.
This sounds like they are distributing their own version of the .NET Framework and that version is used if the workstation does not have the official .NET Framework installed. The rationale behind this could be as simple as to avoid making drastic changes to the user's workstation:
If you already have the .NET Framework installed, it's fine for the application to use it, because no changes to your workstation are required.
If you do not have the .NET Framework already installed, then the vendor doesn't assume you want it installed, so instead they bundle their own build that's intended to work only with their applications and not to be shared with other software you may have.
Regarding the question of how you'd do something like that, the answer is that first of all you need to have some sort of license that allows you to do this. In general, you can obtain a piece of software with its "default" license or you can negotiate a more convenient license with its vendor. In any case, you need to make sure that this kind of usage and redistribution is permitted by the license you have.
From there on, there are probably multiple ways you could go about it (including receiving the source code and making a customized build, using a custom linker or a bundling tool -- or some kind of trickery when launching).
Observing the behavior of this vendor's installer inside a virtual machine, what I see is that the framework assemblies are indeed deployed as native images in a custom directory that seems to mimic the structure of the typical .NET installation directory. The name of that custom directory is %WINDIR%, which to me seems to suggest some kind of redirection using environment variables (because, if you unset an environment variable, it "expands" to its name).
In any case, the deployed framework is used only by the vendor's software and does not seem to affect other .NET applications, they simply ignore it. So the phrase private .NET Framework is reasonably accurate.
Microsoft decided not to publish redistributable .NET Framework 3.5 for Windows 8, Windows 10, Windows 2012 server and online installer very often does not work. So other vendors need to create their own offline installers. It is not the first home-made framework I met. Even if it is not legal, developers are pushed to support the .NET 3.5 apps on Windows 8, Windows 10 and Windows 2012 server.
I don't think they are saying this is related to THE .NET Framework, only that it is Bloomberg-specific code which runs on .NET that they call a framework. Private most likely refers to the fact that they require custom access to their servers via some custom credentials.
I have created a new application on C# 2010. After creating a Setup file I came to know that for installation purposes user must have a dot net framework. Is there any way I can get rid of installing dot net framework on a user computer. Each time I try to install my application on the user computer it redirects to install the dot net framework. Any suggestion?
Well that's a problem; because of the design of .NET applications.
Here's some references for you:
Visual C#
"C# (pronounced "C sharp") is a programming language that is designed for building a variety of applications that run on the .NET Framework." [first sentence]
Intro to C# and .NET
As the comments on the question attempt to imply, the .NET Framework is required in order to execute .NET applications.
You have two choices, really:
Require that users have the .NET Framework installed. This is the most common choice, for reasons that will become clear in a moment. It's not unheard-of to have such requirements. It's similar to requiring that a user have Windows installed in order to run your Windows application.
Distribute the .NET Framework with your application installer. This is possible, but less often used because the .NET Framework is large compared to the average application. However, if you must do this, then the option is at least available. Some quick Googling brought me to this helpful blog post.
This isn't possible. C# is built on the .NET framework, so any C# app requires that a version of .NET be available. At http://en.wikipedia.org/wiki/.NET_Framework#History, you can see what .NET framework versions are available in various versions of Windows. The short story is that XP doesn't include anything, Vista includes 3.0, and Windows 7 includes 3.5. If you build for one of these versions, then on those OSes, your users won't need to install anything extra. Using the Client Profile instead of the full .NET can also help reduce or eliminate installs your users will need to do.
Unfortunately No. Its not possible.
To explain it simple terms.
Suppose if you have written only 1 Line of code where you would have simply declared an int variable, who will tell OS that it should create a space in memory?
That framework does exactly that creates basic environment to run your app in a System.
OOPs says about Real-world modeling and Relationships, so let me give you one from it.
Think yourself to be the C# app and Mother Nature/Environment(Greenry) to be .Net Environment.(.Net is called an Environment)
Can you survive without mother nature? From first second that you are in this world, you breathe. Who provides you that oxygen. MOTHER NATURE
While creating installation bundle you can add dot net frame work exe file as prerequisites, then while installing your application it can check whether the system having .net framework or not. if it is not installed it your application can install the frame work.
When you are using managed languages to writing applications you agreed to use their vm, c# codes compiles to IL which needs dot net framework for executing.
.net framework by default exists on windows 7,8,8.1 and 10 and I don't think that this is a challenge.
but if you insist on it so there is a way by using Mono, just remove features that does not support in mono from your project.
first install mono and cygwin, then copy your exe and mono.dll file to a folder, be sure that your file name is not long because in some cases bundling faild,now you can start bundling using mkbundle command.
after bundling finished you have a exe file that can run without .net framework
hope this help you
I have the same issue and want the app to setup using the existing dot net framework version (4.6), because the app setup requires 4.7.2 version that the PC doesn't meet the requirements
I am very much worried that i have seen many applications which i download from internet and they run without installing .net framework or java run time on windows seven, the confusion is, if it is so then in which language all these applications are built? if it is VB6 then it is very old, why latest software are using it, and did Microsoft not build Windows seven in any .net framework, for example if they build it in 3.5 then why it requires to install 3.5 .Net framework to run application.
Also let me know which db these apps usually use.
They could be built using C or C++, or any number of other languages with no runtime libraries (or whose runtime libraries are built into the OS). They may also just use .NET and assume that clients have the .NET framework installed. Finally, they may actually check for the .NET framework and prompt the user to install it if it isn't there, but since you already have it installed you don't see the prompt.
As for which databases they use, it is common to see applications use SQL Server CE or Express, Berkeley DB (BDB), or any number of other small-footprint databases. There is no clear winner in that area, just like in programming languages.
Mostly, Windows 7 has the built-in .NET framework 3.5 So, it automatically runs the application developed in .NET, where as few earlier version of Windows OS, the user didn't have the needed framework in built. It needs to be installed separately.
I wrote some small apps using .NET 3.5 but now I am stuck with deployment problems. My customer will likely to be pissed off when he learns that he will have to download a 231megs dependency (.NET framework 3.5) which installs for 30 minutes (!!!) on an average machine. All, just to run my tiny apps.
Offline distribution is also problematic, since the customer wants the program to fit on a Mini CD (185 mega bytes maximum)
What can I do? I really like .NET, but now I feel hopeless. With almost any other choice (c,c++,python) I would have saved this headache.
update: this is small data processing software and mostly deployed in offline situations on nettops. I can't host is from the net.
You can use the .NET Client Profile installer instead of the full framework. Should be around 28MB and be a pretty quick install.
http://blogs.windowsclient.net/trickster92/archive/2008/05/21/introducing-the-net-framework-client-profile.aspx
Perhaps you should target the .NET 2.0 framework until your clients are ready to upgrade. Even if you weren't using .NET you will still have these headaches. If you were using Python you would still have to ensure that the user had the proper version of Python installed.
You should try it with the compact .net framework it's only 34mb big, and should be able to be installed quite quickly.
Please remember if you use the .NET setup bootstrapper application, it will only download the parts of the .NET framework that it needs. Usually less than 100mb, in a worst case scenario where they don't even have .NET 2.0 installed.
Also, depending on your application you may be able to use the .NET 3.5 Client Only framework, it is considerably smaller, however I do not know if there is a offline download for it.
You can set your application to use the Client Only framework from the project properties, just check the "Client Only framework subset" checkbox.
This won't work if your application uses WPF or WCF, I think. I'll update this later if I find out I am wrong.
EDIT:
One more option is to use something like Xenocode Postbuild or Xenocode Virtual Application (http://www.xenocode.com) studio to embed the .NET framework into your application so that the client would not need to have .NET installed on each machine.
However, this will make your application exe much larger. A project I work on uses Xenocode Postbuild to embed the .NET framework 3.0 and the exe size ends up being around 50mb, however, the app runs great off of a flash drive.