Can you compile C# so it doesn't need the .NET Framework at runtime?

前端 未结 8 1518
暖寄归人
暖寄归人 2020-11-28 08:53

Is it possible to force the C# compiler to pull all the referenced calls out of the framework and pack them into dlls or even a single executable?

I like writing qu

8条回答
  •  日久生厌
    2020-11-28 09:18

    Not possible. Your "compiled" C# application is a language which the .Net CLR interprets (should have said JITed, Reads the IL, compiles to native code, and then invokes the compiled native code) at runtime.

    FYI .net 2.0 is a standard install on xp SP2 and vista, so you won't be paying that much of a penalty.

    You could look into mono, but this still involves running some kind of framework on your target machine.

提交回复
热议问题