c# SmartDevice Cab Installer with .net runtime installer included - c#

I need to be able to create an install in vs2008 that will install my app and setup .net cf on the smartdevice, because my app requires it.
Is this possible. If so, how can be it be accomplished.
Chris

Instructions for 2005, should be almost the same.
http://msdn.microsoft.com/en-us/library/aa446504.aspx

Related

Run additional EXE from 2012 InstallShield

I have created an installshield project using the Limited edition 2012 of InstallShield.
My application uses the Microsoft Agent 2.0 control in some places. So my question would be :
How do i run the Agent installer from my install wizard? Either before the main app is installed or after...
Also, i have set a prerequisite on the setup project to include .NET 4.5 and the installer to require .NET 4.5...but if i uninstall .NET and run my setup, it simply says i need the .NET Framework, rather than installing it...any ideas?
Add a prerequisite installer for agent. And keep the one for.net, it shouldn't install if it is already present. If you don't need .net then look for a install condition that is requiring it.

How to port a Mono GTK# app to other platforms?

I am working on a Mono GTK# desktop app written in C#. I have developed my app using the MonoDevelop IDE (v2.4.2) on a Mac (OS X v10.6.7). My app depends on the GTK# library (obviously) as well as the Mono.WebServer2 library for running a local ASP.NET server.
I have tested my app on my own Mac as well as other Macs. Everything is working out great. Now, I am interested in porting my app to other platforms (specifically, Windows 7 and Ubuntu v11.04). I have been playing around with the mkbundle command but I haven't had any luck in creating a working bundle for other platforms than Mac OS X.
Since I have tried a number of different solutions without success, I would like to hear from the Mono developers out there. What do you do to port your app to other platforms?
I have been developing C# using Visual Studio for a long time but I am new to the Mono development environment. Therefore, I would very much appreciate a detailed explanation.
Thank you very much!
It doesn't really sound like you're talking about porting, rather packaging. MonoDevelop's "Project/Create Package" function can create simple binary packages (zips etc) or source packages (source plus makefiles) but these are not the ideal form to distribute to most end-users. Some additional work is required to make a polished installer for each platform.
mkbundle bundles the Mono runtime into your app, therefore it creates binaries that are 100% platform-specific.
For Mac, the usual way to distribute an app is as an app bundle. MonoDevelop doesn't automate this for GTK# projects, but I explained how to do it on my blog.
For Ubuntu, you can distribute a zip of binaries and require that your users install Mono, GTK# and xsp. If you create a .deb package, you can embed these dependencies into the package manifest. MonoDevelop doesn't have any tools for creating deb/rpm linux packages, and I'm not familiar with the process myself.
For Windows, you can provide a zip of binaries and require that your users install .NET and GTK# for .NET. You could also create a msi installer and have it check for these prerequisites.
It sounds like you have already solved the problem of packaging for Mac.
On Ubuntu, you would want to create a .deb package that contains your app and requires other packages as dependencies (Mono, Mono.WebServer2, GTK#, GTK+, etc). The following link should get you started on building Ubuntu packages:
https://wiki.ubuntu.com/UbuntuDevelopment
For Windows, you probably already know how to build an installer if you have .NET experience. I would say that you would want to run your app on top of .NET instead of Mono. That is what the Mono team do themselves (for MonoDevelop as an example). Bring in the Mono specific bits like Mono.WebServer2 as part of your application.
Your biggest issue here will be that GTK# requires the GTK+ C libraries to be installed. Probably the easiest thing is to detect if GTK# is installed as part of the installer and ask your users to install GTK# if they need it. You are going to have to do the same detection for the .NET version you require anyway. You can get GTK# for Windows here.
I do not have great instructions for doing this but both the Banshee and MonoDevelop projects do it well. I would take a look at those projects as they will show you exactly what needs to be done.
https://github.com/mono/monodevelop
http://git.gnome.org/browse/banshee
EDIT:
I just recently realized that the code for the GTK# installer is on GitHub here.
There are is also packaging projects available in Monodevelop. you can use them.
I'm doubtful that mkbundle work well other than Linux.
Another option that open your project on other plateform (you can use Monodevelop) and build the project and use some other app to build package.
I just recently created deb package of my own .Net project written in MonoDevelop. From MonoDevelop I created a package with sources and makefiles (makefiles also generated by MonoDevelop) and then i used this guide>
http://www.webupd8.org/2010/01/how-to-create-deb-package-ubuntu-debian.html
to create deb package. Dependencies were mono-runtime and gtk-sharp2.

Can I programmatically install new version of .NET using .NET?

Let's say, I have a .NET 2 installed. Can I programmatically install version 4 using .NET 2?
Of course you can. Include the required installation package and then Process.Start, or even better: make a setup and deployment project for your application and set a launch condition to .NET 4.0 so that when someone tries to install it it will verify the presence of .NET 4.0 and if not ask to install it:
Remark: in the screenshot set .NET 4.0 as launch condition (step 4)
You can do this (just shell out to installer MSI and msiexec.exe), but there are things like lock downs and other security issues to consider. But it's better practise to tell the user to install it and then install your program. Your installer will need to be .net 2.0 code to do this.
Sure. Just start the installer process.
Process.Start("dotnetfx.exe");

Custom Installer needs to detect .NET Framework

I am writing a custom installer in C#.
Can you tell me an easy way to check if the machine has .NET version installed [even 2.0].
In cases where it is not installed, my app doesn't even start.
Thanks
MSDN has a blog post with sample code to detect if .NET 3 is installed.
[Edit: As mentioned by Stephen Clearly, the author of the blog post also released a tool that can be easily wrapped in a custom installer (and supports all .NET versions)]
Otherwise:
You could always use the file system and check in the %systemroot%\Microsoft.NET\Framework folder.
This will tell you if the following release versions of .NET are installed
v3.5
v3.0
v2.0.50727
v1.1.4322
v1.0.3705
I don't know what is your custom installer, but you could use a Setup and Deployment Project in Visual Studio where you can define .NET Framework launch condition.

Is it OK to redistribute the utility installutil that ships with .NET?

I have a .NET service built with C# and it requires install util to be properly installed. However I don't trust that it's always in the right place when my installer runs on a customer's machine. Does Microsoft allow you to freely redistribute installutil with your products?
I'm pretty sure it is part of the .Net distribution package, so it should be there already on any machine that has .Net installed. And if your install msi has a module to do the .Net install for whichever CLR version your app requires, then that will install the InstallUtil for you...
It should be ok, is it not part of the .net framework redistributable which is free? you can always just copy it from the framework folder before calling it, assuming the framework is always in the same place?

Categories

Resources