So, I started with a compiled .exe file of my program, created in Windows MS Visual Studio, and was able to launch it via Mono by typing mono InkMonitorClient.exe in the terminal. Then I decided to pack it in a .dmg install file. First, I created an .app bundle via macpack. Then I used this github script to create a .dmg image.
The installer works as intended, the window appears in which I can drag my app to the Applications folder, and then it appears there.
But then I'm unable to launch it from the Applications menu in the Dock, although launching it by open -a InkTest or /Applications/InkTest.app/Contents/MacOS/InkTest works absolutely fine.
P.S. The .app file, however, fails to launch by double-clicking and does nothing, but opening it it Terminal (as stated above) works. So, basically, the question is: how to correctly convert .NET (created in MS Visual Studio on Windows) exe file to app bundle.
The macpac tool is for Cocoa# applications, i.e. those built using the Mac Cacoa framework. Unfortunately simply putting an exe built with Win Forms or GTK# does not work, displaying all the characteristics you describe, I have burned hours of my life on that one. See bottom of http://www.mono-project.com/archived/guiderunning_mono_applications/.
If your application comprises multiple .dlls and an .exe you could use ILRepack to package up everything into a single .exe for tidiness. Additionally, it's not ideal, but you could also supply a launcher file (.command file on mac) with your app to save a manual launch from terminal.
Related
I have a very simple Windows Forms application (not the one with the .NET Framework) and I want to make an installer for it. The problem is that whenever I'm trying to run the installed application, it displays an error saying that it requires .NET Core to run, even if it's already installed. I tried including everything from the project output folder, including .exe and .dll files, but that doesn't seem to work. Here's how installer project files look like.
Please check out my nanny-level teaching!
Environment:
1.Add Enxtention:
2.Install Microsoft Visual Studio Installer Project:
3.Closs the ide to start installing:
4.Create a setup project:
5.Modify the information as needed:
6.Right click Setup (Application Folder) > add > file > (all the file):
7.Then create a shortcut, cut it to User Desktop and, after creating a shortcut, put it in User Program:
8.Build:
8.Install and run:
I'm trying to run my CefSharp application on a separate computer other than my development machine, but I'm unable to. I built it in Release for the x64 platform, and moved the entire contents of the build folder over to my other computer. I tried running all the executables in the build folder, but none of them would work; when executed, they would not appear on screen, and after some time a window would open up with the generic "this program has stopped working" windows crash dialogue. I tried installing the Visual C++ redistributable and the .NET 4.5 Framework, but it still wouldn't run afterwards. What am I missing?
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.
So I have created a little C# game using XNA and would like to be able to show it to a few people and therefore ideally send it to them. As they're not great with computers I'd like to just simply be able to send them and executable file which they open and automatically runs the game. When I go into the debug folder in my project I find the executable file of my game, however I can only double click and run the .exe when it is in that file. If I drag it out onto the desktop and try and run it, it doesn't open and then eventually I get an error pop up saying 'BouncingBallGame Has Stopped Working'.
Could anybody help me as to why this could be, or am I going about it the wrong way completely and do I need to publish the project in visual studio or something?
Your game will need two things to run:
The appropriate .NET Framework to be installed on the target machine.
To have its supporting files with it. You'll notice that in the debug folder that it's not the only file. The executable needs all of these files too.
As mentioned by System Down
.exe file needs ..NET Framework to be installed on the target machine
& To have its supporting files with it.
or you can make a installer file of your project which will install your game into the host machine.
you can find a good Article here which shows how to build a installer file for your project.
I'm a web developer building my first production grade console application (C# .NET 4.0). I have a question about creating a settings file that the user can edit before running the console app (to customize output folder paths, etc).
I'm a little confused -- when I publish my console application and install it (by clicking on on the generated setup.exe file in my target publish folder), all I get is an entry to my start menu. Nothing gets installed to C:\Windows\Programs, and there doesn't seem to be anywhere else on my system that files get installed to. Essentially, I'm just trying to find the app.config xml file so that I can edit it after the program has been installed. (btw, when I click on the start menu entry, the program executes properly).
Is what I'm trying to do possible?
For a clickonce deployment, the files will be installed under the profile of the user who installed the application (by default).
For windows XP this should be:
C:\Documents and Settings\username\LocalSettings\Apps...
For Windows 7 (and Vista?) this should be:
C:\users\username\AppData\Local\Apps...
An installation program for your software is a separate piece of software.
You can definitely make one but when you compile your console app it doesn't create an installation executable. It just makes it's own executable. You can copy that executable alone and run it. If you need more resources to go along with it and therefore decide you want an installation program, you have lots of options.
The two that spring to mind in this case though, are setting your project to use "ClickOnce" from the project properties, or adding a "Setup and Deployment" project to your solution from the "Other project types" section of the add project dialog box.