Reputation: 871
I developed a WinForms application (using C#, with visual studio 2008) and I have a few questions regarding how to build it properly:
Will the exe release file be able to run on other computer with only the required .net framework and not visual studio (or any other visual-ish program)? The exe file size is only around 50kb, which is way too small for such an application so I really doubt it. I did try this on other computer with .net installed and it seemed to work fine, just want to reassure that though.
Is there any way to include the .net framework functions that I use into my application so that it will run on any other Windows computer (with .net framework installed or not)? As in, include everything in a single exe file, just click-click and run.
Edit: When distributing the program, the 50kb exe file is enough, right? Or should I deliver the whole release folder?
Upvotes: 2
Views: 10124
Reputation: 1651
1)you need the exe AND ALL DLLs associated. All you need to do is grab the WHOLE debug OR release folder since this is the OUTPUT/ result of compiling your application.
2)If you write .net software you need the .net framework to run those applications.
Upvotes: 0
Reputation: 1785
For first question if it is working why you worry about size and size of compiled file quite small i have an exe for small ERP which is around 600 kb. although i have components which fill in.
Secondly you can publish you application using publish faicility incuded in visual studio. you can also include .net framework on customisizing publish. Right click project>Properties>Publish
Upvotes: 0
Reputation: 5414
Yes, your executable will run fine on another computer as long as it has the corresponding .Net package and any referenced assemblies.
No, there is no way to run your application on a machine without .Net installed. .Net is installed out of the box unless you're running WinXP. You can ship .Net installers with your app.
Upvotes: 2
Reputation: 14919
About your first question, it seems just ensuring having related .net version loaded in the target machine is enough. For the second question, as far as I know it is not possible to have a portable small set of .Net framework. You can enable the client to download framework on the other hand.
Upvotes: 0
Reputation: 45135
Yes and yes.
For the second part you can package the .NET framework with your setup project if you wish. Of course, this will make your distributable much larger, so you might want to think about whether that is better than just providing a download link to install the .NET framework.
Upvotes: 0
Reputation: 46008
Look at ClickOnce deployment
http://msdn.microsoft.com/en-us/library/t71a733d(v=vs.100).aspx
ClickOnce is a deployment technology that enables you to create self-updating Windows-based applications that can be installed and run with minimal user interaction. Visual Studio provides full support for publishing and updating applications deployed with ClickOnce technology if you have developed your projects with Visual Basic and Visual C#.
Upvotes: 0