简体   繁体   中英

c# how to create an executable file so people without a compiler can run it

C#如何创建一个可执行文件,以便没有编译器的人都可以运行它。我已经创建了一个Sudoku控制台应用程序,这真是太神奇了。电脑..像电子游戏之类的东西

只需在发行版中构建您的应用程序,然后运送您在其中找到的可执行文件:

<YourProjectPath>/bin/Release/<YourProject>.exe

If you want you can create an installer for your app, for example using the free and powerful Inno Setup . There are tons of tutorials and samples on Internet regarding Inno Setup, covering pratically any need.

For example, there are scripts able to check, while installing your app, if the target PC has the .NET version needed for your application to run properly and there are scripts to download and install (even silently) the needed .NET framework.

With an installer, your users will be able to install and run your application simply running your setup executable, downloaded from your website, for example.

I think it's a good idea to spend some hours to learn something so useful.

I spoke about Inno Setup, but there are several others installers ready for your needs: NSIS is another example of free installer (even if its language is a bit harder to learn). Or WIX, Setup Factory, InstallShield... but some of them are not free.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM