Windows form application as outlook plugin installer - c#

I have build C# windows form application using visual studio witch is simple outlook plugin installer.
It does these steps:
generates GUID and stores it to windows registry (for logging purpose later in outlook plugin)
Downloads actual outluck install files
Launches outlook plugin installation
The problem is that I can run this setup if .net framework is not installed. Is there a way of checking is framework installed? Or maybe there is a way to convert this app to native windows application (without .net dependencies). Or maybe it is possible to include needed dll's only?
I have tried using mono mkbundle, but I am getting strange errors in windows like Program too big to fit into memory or something with wrong application architecture (x64 X86).
I have also found some commercial tools for that like .net fuze. So maybe there is free alternatives witch does something similar?
Or maybe this single file installer idea is wrong? Maybe I should use something different?

Related

How do I compile a C# application on a Mac in Visual Studio?

Basically, my school only has Mac computers, however they're telling me to learn C# and to do so using Visual Studio. However, the school program is fairly new and the projects are self-guided. I've been coding in C# using Visual Studio and it's been working so far - it's run successfully and everything. However, I can't seem to find a way to export or publish my code into a standalone application. I've tried using WineBottler to convert the .exe into a .dmg, but I can't seem to make it work.
How should I do this? Moving to Windows or another IDE/compiler isn't an option. I've currently been creating my projects in a Console App, but I could change that if necessary.
After quite a bit of experimentation and research, I've found that while you can publish a .NET Core Console App within Visual Studio for Mac, the feature is not supported within the GUI of the program (for whatever reason).
In order to publish, you have to Control-Click on the solution in the Solution Explorer and open the project in the command line by clicking Tools > Open In Terminal.
Once there, type in the command:
dotnet publish -c Release --framework netcoreapp2.1 --runtime osx-x64
This will create a self-contained program for 64-bit mac os on the v2.1 .NET Core framework. The runtime can be changed for different operating systems and the version number for netcoreapp can be changed based on which version you're using and what is compatible with any plugins for your program.
The final product will be found in yourprojectfolder/yourprojectname/bin/Release/netcoreapp2.1/osx-x64/publish
You should have no issues creating and compiling .NET CORE console apps using a Mac. These apps will have limited .NET functionality, do not have .exe files, and are platform agnostic. Here is a quick guide you can reference to decide if .NET CORE is the right option for you.
If you are trying to create WinForm apps or something similar, you cannot do this on a Mac. There are "work arounds" using Wine or other tools, but my experience with those options has been suboptimal at best. If you need to create apps like this, then your best option is to program on a Windows machine. Perhaps ask your school to enable bootcamp and install Windows 10 OS on one of the Mac machines.
You can generate exe using the terminal if you are on OSX. You can follow this post
It requires :
Visual Studio For Mac
A .cs file
Few lines in terminal

Deploy a WPF application with .NET 3/3.5 in a single executable

I have developed a WPF application and the customer is planning to deploy the application on DVDs.
My application is really simple and doesn't require any setup process, but I need to assure that if the client doesn't have .NET 3 installed that it will be installed locally (from the DVD) before starting the WPF application.
So, what's the easiest was to add the .NET 3/3.5 package locally on my DVD and assure it'll be installed before running my application? Remeber that my application will be a standalone application.
when you use the publish option...
The Project Properties has a place to specify the dependancies that will need to be downloaded
then you simply check the boxes
there are other more complex ways to go abaout this but for .net 3.5 you don't have to go far
I would suggest using Visual Studio Setup Project for creating a setup package which would check for prerequisites and provide fundamental features like file system, registries, scripting. It is very easy to get started with. Take a look here for a brief walkthrough.

Develop and Deploy the software which made in C#.Net

I know how to develop C# Winform application, but don't know anything about deployment/distribution for C#. Please say the technologies, procedures, and other setup for my objective.
Objective:
I like to develop and deploy[distribute] one small application software in C# .Net 3.5. I want some capabilities for the distribution that like other software products. ie. I want to develop software with installation wizard, set icon, and run even who didn't have any visual studio[Likewise, how the other software product like java games run without people must not installed the JDK.].
1) If you need an installer you will have to use some install wizard software. Examples are: InstallShield or WISE.
2) Otherwise you do not have to do much, just copy everything from your bin\Release folder to the other computer and run the exe file.
You can use the WiX Toolset to make installers, which also integrate into build processes if you are using a build server. It can be used to make .exe, .msi and various other types of installations, including patches.
As far as I know it's one of the more commonly used installer frameworks, and you can find it here: http://wixtoolset.org/
Deploying Applications, Services, and Components Here you can read about many of the ways you can develop and deploy services from Visual Studio 2013. There are plenty but all are well documented to suit the most different needs.
From the source
Create a setup program: You can create a setup program by using InstallShield Limited Edition, which is free. http://msdn.microsoft.com/en-us/library/dn531020.aspx
Deploy a desktop application: By using ClickOnce deployment, you can publish a desktop application to a web server or a network
file share. Users can then install the application with a single click. http://msdn.microsoft.com/en-us/library/t71a733d.aspx

Win Form exe closes immediately after launch, deploying a win form application using setup project

I have created a win form application in c# with sqlce. I followed the steps here http://erikej.blogspot.dk/2013/10/sql-server-compact-4-desktop-app-with.html making some tweaks along the way since I was using sqlce 3.5 .net and that blog was talking about 4.0 .net.
When I finished the application, I created a set up project and build it which gave me an msi and setup file.
Now when I run this set up on my own machine where I developed the applicaton, it works a charm.
I tried it on a friend's machine as well, it worked well, he had visual studio 2010 as well on his machine.
Now when I tried it on 2 other machines with VS, after installation, on launching the exe, it launches and immediately closes, I do not see anything although.
I know it launches as i look at processes from my task manager it shows it in there for like 3-4 seconds and its gone.
I tried using this Not able to run the .exe file created from c# where i wrapped the try and catch around all the code inside the root win form but no text file was created with any errors.
On doing some research, it says it could be because I am missing some dll's, how do i make sure all the dlls from the references would be copied into the project ? I set all dll's to true for copy local.
Is this something else and not related to dlls?
I really just want to be able to install the application on any machine without any problems.
Thank you for your time.
EDIT
I need to add that this was a project that involved using an XBox controller sending data to a wireless receiver that was hooked to a PC. I used the XNA framework to intercept these and display some form of output on the Win Forms.
When packing and installing/deploying an application that makes use of the XNA DLLs on another non developer machine, the XNA framework needs to be installed.
My solution was packing my application along with the xna installer and so the xna framework installs as a prerequisite and then my application installs and then it no longer crashes.
Thanks to mrlucmoring and Mark for their support and troubleshooting.

C# .net 4 dependency

I have a standalone tool developed in C# Visual Studio Express 2010.
My problem is that this tool will fail to start on machines having no .NET installed, and asking for .NET 4 on machines has .NET under 3.5 or lower.
What I basically want to do is to install .NET 4 from my application before the main script runs. I can write a program to download it from an official webpage, also to run the installer etc. But the main problem still exists, the app won't even reach the download part as it won't run on machines...
I've googled around and found that you can include dll-s etc., but I still doubt I can proceed without a proper .NET installation. So how can run dotnetfx.exe with my .NET dependent application?
Your attention and ideas are much appreciated.
Cs.
Use ClickOnce - it takes care of dependencies when configured correctly and comes integrated/free with VS.
EDIT: So vs express editions don't support setup projects. Plan B: wix.
simple. your installer must not be a .net application. just write your own c++ version or use some existing application. here is a link to show you how to do silent installs of .net 4. just include the setup application with your program. I would be very surprised if some of the msi installer tools out there do not have .net installation support.
http://blogs.msdn.com/b/astebner/archive/2009/04/16/9553804.aspx

Categories