Programatically check which versions of .NET Compact Framework are installed - c#

I have a Windows Mobile application that is built for .NET CF 1.0. It is written in C#. How can this program check what versions of the .NET Compact Framework are installed on the device it is running on?

It really depends on what you mean by "installed". If they were installed via CAB file (the most common), there will be entries in the registry under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETCompactFramework that you could programmatically check.

Related

running C# application on PC without having .net framework

I prepared a C# application that reads from registry and saves result in a simple notepad file. I tried to run it on another PC that doesn't have .net Framework. It gave initialization error because of not having .net Framework. The problem is that I can't install .net framework on that PC which has Win XP. Is there any way that I can run this application without having .net framework??
Please help as I need it urgently>>>....
Latest windows OS is normally packed with a default .Net Framework. Windows XP is packed with
XP
NET v1.0 Service pack 1
NET v2.0 -- Service packs 2 & 3
If it's not necessary for you to use latest version of .net Framework then you could change the target .Net Framework of your application[Go to Project Properties > Application > Target framework] to lowest version that default OS version has then you should be able to run your program without installing latest .net framework.
Pack .NET DLLs with the application.
In reference section set copy on build.
Right click on reference (e.g. System.Web) and press F4. Rest is pretty self-explainatory.

What is required to run a c# console application on a computer

I have created a simple c# console application with .net framework 2.0 that uses MySql. What steps should I do in order to get the program run on another computer(Windows Server 2008)?
I already have MS .Net framework Clent Profile and MS .Net framework Clent Profile Extended installed.
Should I install .net framework 2.0 Service pack too on the other pc?
Thanks.
You just need .Net Framework 2.0 or later to be installed on the machine.
It would would be better to make an installer.
Make sure you have .Net framework 2.0 installed on the computer. Also make sure you have the .Net dlls required for making connection. If your application is going to use the local machine as MySQL server then, you may have to intall MySQL on the client machine as well, or you can make an installer with MySQL installation included. You can use InnoSetup or you may check out the following thread Deploy MySQL Server + DB with .Net application
Environment - .Net Framework.
Version - Same as one or higher in which you app is targeted.
Why i said no particular version number because what if you app is in 4.0 and you have 2.0 installed?
That's why same version or higher.

How windows based applications run without .Net framework

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.

Make .NET exes compatible with all windows users (xp to 7)

If I create an application in c# 3.5, how could I make the exe compatible with all windows users?
I tried creating a couple of simple applications and send the exes from the bin folder and everyone has complained that they could not use them because they didn't have the update platform.
Any suggestions?
IIRC, C# 3.5 can generate code for .NET 2.0 or newer, by changing the project options.
But your users still will need the right version of .NET installed, and .NET 2.0 is not included in XP, not even with SP3.
If installing framework updates is too much to expect of your users, you will need to use native code instead of .NET.
You can change the target platform to a previous .NET framework version:
Check Menu| Project | Properties | Application and the setting Target framework, set it i.e. to .NET 2.0 if required - you will not be able to use new features then though - a better alternative would be updating those machines to add .NET 4.
It should be fine as long as you have it set to Any CPU and the users have the same .NET framework version installed.

What are the requirements for running .net application on windows ce5?

What are the requirements for running .net framework targeted application on Windows CE 5?
If I try to start an application that I developed for Windows Mobile 6, I will get the following error.
Cannot find 'Projectname' (or one of
its components) Make sure the path and
filename are correct and that all the
required libraries are available
My app is a simple hello world app. What could cause that such error message?
Is there a way to dertimine which .net compact framework version is running on my system?
You can run cgacutil, which is in the Windows folder. It should give you a version number of the compact framework installed onto the device. It's likely you dont have the correct compact framework installed.
If you dont have cgacutil, its likely that compact framework isnt installed to the device at all. In this case download the latest version of the framework (currently 3.5, available here). The install may take around 7MB of space from your main memory. If storage space is tight, it can be installed to external memory, with some potential consequences as discussed here
The problem is caused by what you're wondering... Which version of compact framework is installed in your system and, most of all, if there is a version of compact framework installed.
I suggest you to download the version corresponding to your developing environment and install it in your device.
By default, Windows Mobile 5 comes with .NET Compact Framework 1.0 SP3 pre-installed.
An application developed for Windows Mobile 6 is at least going to use .NET Compact Framework 2.0 SP2, therefore make sure that it is installed on the Windows Mobile 5 device.
You can download it here, but generally it is a good practice to install the latest version available, as long as it is supported by the device.

Categories

Resources