What's new
  • Welcome to PHCorner forums. Take a moment to sign up and gain unlimited access and extra privileges that guests are not entitled to, such as: All that and more! Registration is quick, simple and absolutely free. Join our community today!

Tutorial Deploy .Net Applications without .Net Framework

fallen90

Enthusiast
Joined
Mar 10, 2013
Messages
122
Reaction
156
Age
29
Good day guys, first time ko lng magpopost sa programming section kasi kadalasan nagrerelease ako ng mga gawa ko, i dont have time to create tutorials ^_^

THIS APPLIES TO ANY .NET LANGUAGES (VB.NET, C#)

WHAT YOU NEED:

1. MoMa - (Mono Migration Analyzer) This helps you to find some methods or issues during the porting to Mono from .NET..
-if you are using windows API calls frequently, i advice you not to proceed .. it would be useless and would conform to a lot of exceptions and compilation errors
You do not have permission to view the full content of this post. Log in or register now.
2. Mono for Windows and GTK# with XSP server -
You do not have permission to view the full content of this post. Log in or register now.

3. GTK# for .NET - for the graphics. used by mono instead of GDI
You do not have permission to view the full content of this post. Log in or register now.

4. Cygwin - Linux feel on windows. We need this.
You do not have permission to view the full content of this post. Log in or register now.

5. Notepad++ (optional) search google
----------------------------------------------------------------------------------

START ! ^_^

1. Pag natpos mo ng madownload ang lahat ng mga iyon. install mo isa isa.. in this following ORDER
-GTK# for .NET
-MONO for WIndows
-Notepad++ (kung wala ka pa)

2. magtataka kau, ung Moma at ung Cygwin ndi pa iinstall? Mamaya pa.. ^_^ ... ngaun, i extract ang Moma, dahil naka Zip file un.. at i run ang Moma.exe,

Follow the steps on the screen, then on the select Assemblies to analyze... press the "+" button .... Browse for your .exe file.. the compiled Executable.. in the bin folder, either on the debug or the Release

.. then run the analyzer.. if you saw no errors, you can proceed ^_^

ung sakin, may dalawang methods na sabi eh "2 Methods are Marked as MonoTODO" pero sinubukan ko parin


3. Now install Cygwin

Open the Setup.exe
Click Next>
Select "Install from INternet"
See if you want to modify the Cygwin directory or not, press Next if not>
Set your Local package directory, if the directory is ok, press next >
Select Direct Connection, press next >
wait till the mirrors are downloaded.
Select the top mirror. press next>
Wait till the download finish
the Cygwin Package installer window would open, now install three packages
gcc-mingw, pkg-config, mingw-zlib1, mingw-zlib-devel

type nio lng...sa search bar

pra ndi kau mahirapan, gumwa ako ng video tutorial para sa pag install ng Cygwin.. para dito.
4. after installing Cygwin, open up Notepad ++ and paste the code

choose your operating system archi

WINDOWS 64bit
Code:
#!/bin/bash
#this is for Windows x64
set -o errexit
set -o nounset
export MONO=/cygdrive/c/progra~2/Mono-2.10.9
export PATH=$PATH:$MONO/bin
export PKG_CONFIG_PATH=$MONO/lib/pkgconfig
export CC="i686-pc-mingw32-gcc -U _WIN32"
mkbundle "$1" --deps -o "$2" -z
cp $MONO/bin/mono-2.0.dll .


windows x32
Code:
#!/bin/bash
#this is for Windows x32
set -o errexit
set -o nounset
export MONO=/cygdrive/c/progra~1/Mono-2.10.9
export PATH=$PATH:$MONO/bin
export PKG_CONFIG_PATH=$MONO/lib/pkgconfig
export CC="i686-pc-mingw32-gcc -U _WIN32"
mkbundle "$1" --deps -o "$2" -z
cp $MONO/bin/mono-2.0.dll .


copy it per line, or else, magkakaerror sa execution ng shell script. magndang itype nio by hand to prevent it.. tried and tested po ung code

now save it on the folder where your executable lies.. and name it as package.sh
it's upto you kung anu ang gusto niong pangalan, pero basta .sh ang extension

5. lastly is running the packager....

open Cygwin Terminal on your desktop.

navigate to your folder where your executable file is in...

TAKE NOTE, if the path is C:\Users\Somebody\My Documents\Visual Studio 2012\Projects\SomeProject\SomeProject\bin\Debug

the C:\ in cygwin is /cygdrive/c
it's a couple of cd's to get to your directory eheheh ^_^
so let's say your' on the folder where your exe file together with your other files is in there,.. and also the package.sh is also there.. let's run the packager script
type in the terminal
Code:
./package.sh <your_exe_name_withextension> <dependencies_you_want_to_include_space_seperated> <output_filename_withextension>
 
examples
 
./package.sh NeoColor.exe Neo_packed.exe
 
./package.sh NeoColor.exe DevComponents.DotNetBar.dll Ionic.Zip.dll Neo_packed.exe

then press enter to execute. ^_^

w8 for the process to finish..

read carefully to what errors would the packager encountered if any.


you can post your problems encounterd during the packaging process.


.. DEPLOYMENT

When deploying or distributing your application that had been packaged.. you should take to considerations the following

-the mono-2.0.dll must be on the same directory as the package exe or dll, coz it depends on that
-the same assemblies (dll files) that you refenced on your project may or may not be required to include it in the application directory, itest muna kung gagana ng magisa lng sila ng mono-2.0.dll


THAT"s all.. pag may tanung. post nio lng ^_^
 

drian90

Established
Paps may installer ka na VB.NET 64bit? Ayaw kasi mag run tong vb.net 2008 ko eh baka 32bit lang to na installer. I am using windows 10 64bit. Thanks
 
Comment

Online statistics

Members online
1,787
Guests online
2,029
Total visitors
3,816

Forum statistics

Threads
1,074,506
Messages
18,148,949
Members
1,517,322
Comments
1,098,930
Attachments
1,394,095
Profile posts
97,647
Top