0

I have created one application using Windows Form in C#,I have use many external library as well as other resources like images,mp3 etc., Now I have need to deliver this as standalone executable (single executable) that directly run on client machine ,They no need to install it.

So,I need your help for that,please help me to create standalone executable file.

Thanks in advance.

Hiren Patel
  • 735
  • 5
  • 23
  • I think Costura is the way to go. SEE HERE : https://stackoverflow.com/a/20306095/6399544 – Cesar Aug 02 '18 at 09:49
  • I have tried that but it doesn't work for me – Hiren Patel Aug 02 '18 at 09:58
  • *"no need to install it"* - I would reconsider this requirement. Installers packages are typical way to deliver a product (or zip package, to download everything with one click). The only purpose of not having to run installer is to create a portable version to avoid hassles with installing libraries. But having portable version as single exe .. why? – Sinatr Aug 02 '18 at 10:24
  • i don't to force my user to install the software , Just Download it and use it as portable software – Hiren Patel Aug 02 '18 at 12:09
  • @HirenPatel If I solved your issue, could you please validate my answer ? Thanks. – Cesar Aug 05 '18 at 09:33

2 Answers2

0

If you want to incorporate ressource in your .exe you can use the property

embedded ressource

Go in visual studio

-> Click on your ressource (bmp, mp3 etc ..) -> Go into properties -> Generated Action -> embedded ressource

Then you can use your ressource like this :

System.Reflection.Assembly.GetEntryAssembly().GetManifestResourceStream("PROJECTNAME.Resources.RESSOURCENAME")
Cesar
  • 452
  • 5
  • 17
0

As Cesar already mentioned it, Costura works really fine once set up correctly (using same .NET Versions etc.)