Create a standalone exe without the need to install .NET framework

前端 未结 7 1523
没有蜡笔的小新
没有蜡笔的小新 2020-12-31 00:41

I\'m a student and at the moment i\'m doing an internship at a company. This internship is about analysing a project. For this project I have made a demo to show to the Mark

7条回答
  •  情话喂你
    2020-12-31 00:57

    You can't build a C# executable without .NET Framework. Even if some resources indicate that you can, that only works in theory.

    But you could use an older version of .NET Framework like .NET 4.0. If this doesn't work for you, you have to choose a language like C++ which doesn't require CLR at all.

    Update 2018:

    Do not target .NET 2.0 or 3.5. It's not compatible with the 4.x version. However, .NET 4.0 targeted binaries work with .NET Framework 4.0, 4.5, 4.6, 4.7 and so on. So to reach maximum compatibility, compile with .NET 4.0. You will have to accept that some features will not be available, however, your binary will run virtually anywhere.

    (2018: By now, .NET 2.0 - 3.5 has much lower distribution than 4.x)

提交回复
热议问题