publish program in Visual c#

Thread Starter

harrison_c

Joined Aug 5, 2010
6
Hi all,

I am learning visual C# and I am using visual C# 2008 Express edition. I am trying to publish my program and install on other computer which has not visual C# installed. But I am asked to install .NET framework in order to use my program. Is it possible to do without installing .NET on the computer?

thanks.
 

BMorse

Joined Sep 26, 2009
2,675
It is because of file dependencies of your application and runtime files.... without those on the PC that you are running the application on, it will not run, or you can just create an installer package and include all file dependencies in it, so when the installer is run on the other PC, it will also install all necessary files for your app to run....


B. Morse
 

Thread Starter

harrison_c

Joined Aug 5, 2010
6
It is because of file dependencies of your application and runtime files.... without those on the PC that you are running the application on, it will not run, or you can just create an installer package and include all file dependencies in it, so when the installer is run on the other PC, it will also install all necessary files for your app to run....


B. Morse

Ok! but how? Can you show me how or where i can learn from?
 

BMorse

Joined Sep 26, 2009
2,675
You can watch this to learn how >> http://www.youtube.com/watch?v=_HUrzRowdec


You should have another application that was installed as a separate program on your PC when you installed Visual Studio, that is called Setup And Deployment Wizard, use this or similar application to create a setup package for your program.


B. Morse
 
Last edited:

Thread Starter

harrison_c

Joined Aug 5, 2010
6
It is because of file dependencies of your application and runtime files.... without those on the PC that you are running the application on, it will not run, or you can just create an installer package and include all file dependencies in it, so when the installer is run on the other PC, it will also install all necessary files for your app to run....


B. Morse

Hi, where I can find my file dependencies of application and runtime files? .dll? I only find these files after I published. Please see Attachment.
 

Attachments

debjit625

Joined Apr 17, 2010
790
You will have to install .Net framework on the system where you want to install your application.Just giving the dependencies files will not make your program run.
Why? The programs compiled in C# is called a .Net based program these code targets the common language runtime (CLR), i.e.. these program are compiled in a different language known as MSIL (Micro Soft Intermediate Language).Its different from native language which our processor understand like in C or C++ if you write a program the exe file will contain Native binary code that is understood by our processor.But MSIL is not understood by our processor so it need some thing to convert the codes into native codes before it can be executed by the processor,and this is done by .Net.Its kind of java type where in java programs you need javaruntime.Another thing not only C# is .Net based but their are other language also like C++.Net,VB.Net.The file dependencies are the files which the program needs from .Net to run, but these files will only run under .Net.

When you create A Setup from "Setup And Deployment Wizard" it includes .Net in the package or it will do a web install of .Net if its not found on targeted system.

.Net is a very vast topic it cant be explained in one post for now just think .Net as a virtual processor,Google on .net to know more

Good Luck
 

Thread Starter

harrison_c

Joined Aug 5, 2010
6
You will have to install .Net framework on the system where you want to install your application.Just giving the dependencies files will not make your program run.
Why? The programs compiled in C# is called a .Net based program these code targets the common language runtime (CLR), i.e.. these program are compiled in a different language known as MSIL (Micro Soft Intermediate Language).Its different from native language which our processor understand like in C or C++ if you write a program the exe file will contain Native binary code that is understood by our processor.But MSIL is not understood by our processor so it need some thing to convert the codes into native codes before it can be executed by the processor,and this is done by .Net.Its kind of java type where in java programs you need javaruntime.Another thing not only C# is .Net based but their are other language also like C++.Net,VB.Net.The file dependencies are the files which the program needs from .Net to run, but these files will only run under .Net.

When you create A Setup from "Setup And Deployment Wizard" it includes .Net in the package or it will do a web install of .Net if its not found on targeted system.

.Net is a very vast topic it cant be explained in one post for now just think .Net as a virtual processor,Google on .net to know more

Good Luck

So it is because of C# or because I am using visual C# 2008 express edition? How about if I use VB, VC++ 6.0? Or I can use visual basic/c++ 2008 Express edition but not C#?
 

BMorse

Joined Sep 26, 2009
2,675
If you want to get away from using the .net, you will have to use an older version of Visual Studio, possibly use VB 6.0 or Visual C# that is not based on the .net structure...


B. Morse
 

debjit625

Joined Apr 17, 2010
790
If you want to get away from using the .net, you will have to use an older version of Visual Studio, possibly use VB 6.0 or Visual C# that is not based on the .net structure...
When Microsoft built .Net they built a language for it and that is C# so any C# compiler will compile code which target CLR .i.e.. it needs .Net at any cost.

Now if somebody dont like to be their application .Net based.The will use native ,in Visual Studio every edition from 2003 onwards i.e version 7.0 i think their is two part Manage and another is Unmanaged .The managed stuff is for .Net based application i.e CLR type application and the unmanaged part is for Win32 Applications which is native.

So it is because of C# or because I am using visual C# 2008 express edition? How about if I use VB, VC++ 6.0? Or I can use visual basic/c++ 2008 Express edition but not C#?
Using VB the older one used its own VB runtime dll if this dll is not found in the current system then the application will not run.It will be much better to use .Net
so if you use VB use current VB.Net which is a CLR application.

Yes C++ 6.0 compiles codes into native which dont needs .Net and same for New C++ editions.In current Visual Studio package you will find their are two type of application can be created by C++ 1)CLR which is a .Net based 2)Win32 which is native.

In VisualStudio if you want to create native applications just open a new project and select win32 node and select Win32 Console Application.

Good Luck
 
Top