Embedding DLLs in a compiled executable

前端 未结 16 2684
情深已故
情深已故 2020-11-21 07:07

Is it possible to embed a pre-existing DLL into a compiled C# executable (so that you only have one file to distribute)? If it is possible, how would one go about doing it?<

16条回答
  •  天涯浪人
    2020-11-21 07:44

    .NET Core 3.0 natively supports compiling to a single .exe

    The feature is enabled by the usage of the following property in your project file (.csproj):

        
            true
        
    

    This is done without any external tool.

    See my answer for this question for further details.

提交回复
热议问题