Can c# compiled app run on machine where .net is not installed?

前端 未结 5 768
遇见更好的自我
遇见更好的自我 2021-01-19 10:49

I want to develop a small utility for windows and I prefer doing that in c# because it is easier (I\'m a java developer).

The utility will be available for download

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-19 11:52

    Normally, you will need the .NET Framework being installed on the target system. There is no simple way around that.

    However, certain third-party tools such as Xenocode or Salamander allow you to create stand-alone applications. See this related question:

    Is there some way to compile a .NET application to native code?

    As these solutions are not straight-forward and require commercial products I would recommend you to create a simple Visual Studio Setup and Deployment project. In the properties of the project you should include the .NET Framework as a pre-requisite. The setup.exe created will then automatically download and install the .NET Framework prior to installing your application.

提交回复
热议问题