Xamarin C# Cross Platform Application - c#

I am new to using Xamarin and have always used Visual Studio, however I now require to develop a desktop application which will run on both Mac and Windows, OR at least a package which will let me package for both.
I have created a GTK 2.0 Project, connected to a MySQL database etc and all is fine, however I can only see options to create a .exe and no .dmg file for OS X but the debugger lets me run it on my Mac.
Does anyone have any ideas or pointers?

We use Xamarin.Mac to enable us to develop a Windows and Mac client using c#.
We chose to re-build the core code in Xamarin Studio and use interfaces to abstract the OS dependent code.
We share 90% of our code in the Xamarin.Mac/VS solutions.
Do let me know if I'm helping... if so I can provide more detail if need be.

Check the following link on how to create an .app bundle with Xamarin:
How to set Xamarin MonoMac project so its build outputs .app package instead of .exe?
An app bundle is basically a special kind of folder structure that contains all app data, including e.g. graphical resources, configuration files, localisations, etc...
A .dmg file is used for distribution and can be created using other tools like Apple's own Disk Utility, once you've created the app.

Related

Getting app to install emulator in a xamarin project without having the source code

I have looked through the Microsoft documentation but everything seems to want you to run everything with the development code. I used a bitbar tutorial to help start my C# xamarinui test framework. I have the emulators working I just want the apk and ios apps to install as the first test. I know how to drag and drop and put the app on the phone manually. I am looking for a way to get the app to install and launch through test code or by some operation. I do not have access to the source.
Only for the Android case, google for the apk, usually they are available on sites like apk pure etc. If the apk has executables for x86 inside you could install in on android simulator using just drag and drop.
For iOS this seems not possible as the installer has to be signed with appropriate profiles that only app developer has in his possession.

Develop with SQLite on mac and run on Windows

I'm very new to using C# and .Net on MAC so:
I need to develop a desktop application using either WinForms or WPF with a local database that will not nee any installation, just run the ".exe" file and use the program.
I have a new MAC laptop that runs smooth and an old Windows laptop that takes an hour to load.
So trying to work with the Windows laptop drove me crazy and I've decided to try and compile all the DAL and BL projects on my MAC and have only the UI on the Windows laptop.
I can't work with Microsoft Access as a database on my MAC so I thought I'll use SQLite instead (Still don't know if it's a good idea).
The thing is:
Are there .dll files of SQLite for MAC?
If I compile the DAL and BL projects on my MAC will would I be able to use their .dll files on the UI project in the Windows laptop? Or would I need to copy the projects and replace the SQLite .dll files for Windows?
Appreciate your help.
If your target platform is Windows, you maybe could consider using Windows and Visual Studio via Bootcamp or VM on your Mac. Sqlite can be integrated by nuget package.
Found this link to use SQLite Mono.
Also here is a great tutorial to get started with SQLite: SQLite tutorials

Publish Winforms Application to a website

I've built a Winforms Application, and I want to publish it. I'd like to have a link on a website https://sites.google.com/site/satsavvyboardgame/home where I can have the user download the application and have it install on their computer. So far, I haven't found any way to wrap everything up in one package, or successfully publish to the web. What are the specifications for the URL to publish to the web?
Is there any way to package everything into one item (the site won't allow me to upload/download folders), so that the user could download one item, then run that or something in it?
Is there another way to do this that I haven't seen?
I'm using C# Visual Studio 2010 Express, and my application has the code and a couple of XML files that I need to run. All are part of the project, and run fine when I install from a file using the CD publish settings.
I've never published an application before, so any help would be much appreciated. Thanks!
You have 2 general options:
use "ClickOnce" which will enable automatic updates each time the user click to install and have several other benefits such as less problems with priviliges.
Use "Windows-Installer", which allows you more control of how to do and what to do during the installtion phase. However, shamefully, Package & Deployment project types do not exist anymore in vs2012. there are several 3rd party packages you can work with to create your setup-project.
The ClickOnce is preferable if what the user download is a just a simple standalone game application for example.. the MSI is for the more "rich" applications that should make extensive usage in the machine registry and etc..
The table in this link will give you the data you need to make a decision:
http://msdn.microsoft.com/en-us/library/142dbbz4(v=vs.80).aspx

how to make an executable version of a WPF Kinect Application?

I have made a Kinect Application in Microsoft Visual Studio 2010. I need to make an exe of the application which can run on any windows based system. If I need to do that than is there any requirements that the system should fulfil? and If yes, then how do I do that?
I tried to use the exe in application/bin/debug/application.exe by copying it in another folder but it shows an error but if I run the exe from the bin/debug/application.exe it works. Am I missing something here or is it the only way to do that?
"Any Windows based system" isn't going to work. Assuming you're using the Kinect SDK, it will only run on Windows 7 (and supposedly Windows Server 2008). The computer running the application will need either the Kinect Runtime, which only works with the new Kinect for Windows sensor, or the Kinect SDK, which also works with the Kinect for Xbox. Microsoft wants to sell more Kinect for Windows sensors, so they don't allow the runtime to work with the old Xbox Kinects. Makes sense in a way, but man that bugged me when I first found out about it. There's a short post showing how to test for the existence of the Runtime on application load, so you can show an appropriate error message instead of just crashing out.
You need to copy any files that the program relies on, such as DLL files, along with the executable. There's instructions here for how to embed the DLL files into the executable; I've not tried it but it might be worth a shot.
The correct .NET version should be installed when either the Runtime or the SDK is installed; you shouldn't have to worry about this.
#Coeeffect is right, but you can also publish version 1.0.0.0 of your app by going to project -> properties -> publish -> publishing wizard to publish your application to then use on ther computes ect. Hope this helps!
You need to copy all non-standard DLLs that your program uses.
The target computer needs the appropriate version of .Net.

Why do I need an install wizard? How do I create one?

If I create a WPF or WinForms app, I can launch it by its executable in Debug folder. Why do all programs come with an install wizard and how do I create one for my WPF/ WinForms app?
Programs usually come with an installer because it can put the program in a known location, add things to the start menu, add registry keys, etc.
You can create an installer using NSIS.
installers will be run (most of the time) by administrators. This will allow you to modify protected things of the system during setup such as the file system (Program Files folder), registry and install services and such.
The actual program then will not need these privileges and can be run by non-admins.
Also: Microsoft Logo requirements make the use of Windows Installer (the service that installs MSIs and adds them to your control panel for easy removal) mandatory.
While deploying a windows based application to a client machine we need to take care about several aspects like installation location,Registry values and to ensure that the required version of .Net framework is present in the client machine.Such kinds of things can be automated using an installer.You can create an installer by using the setup and deployment project or using clickonce
Check the below links for more
Setup and Deployment Projects
Deploying a WPF Application (WPF)
Deploying a Standard WPF Application Using ClickOnce and Visual Studio
WPF 3.5 SP1 Deployment
For example, almost any program produced by Visual Studio 2010, if copied to a freshly installed Windows XP system, will fail to run. This is what installers do well that is hard to get right: dependencies.

Categories

Resources