Standalone executable

I am working on a relatively simple program in VB.NET. I am trying to make the installation process as simple as possible for the user.

I know that you can use the executable from the debug directory as a standalone executable, but are there any flaws in this approach? For example, if the user does not have .NET on his computer, the program will not work.

Is there a way to publish a program so that it is self-contained in a single executable file?

Thanks for the help.

+3
source share
4 answers

, ClickOnce - . , : ClickOnce

+2

, Microsoft ILMerge, , , . - .Net Framework, . DLL .Net, " " .

, DLL . , , dll , . DLL, , dll ResolveEventArgs.Name.

Module Program
    ''//Entry Point add dependency resolver hook
    Sub Main()
        AddHandler AppDomain.CurrentDomain.AssemblyResolve, _
                   AddressOf AssemblyReslover
    End Sub

    Private Function AssemblyReslover(ByVal sender As Object, _
                                  ByVal e As ResolveEventArgs) _
                                  As Assembly
       ''//ReferenceAssembly
        Dim ra As Assembly
        ra = Assembly.Load(My.Resources.MyDLL)
        Return ra
    End Function

End Module

http://support.microsoft.com/kb/837908

+2

Red Gate Smart Assembly .NET . .

, . , .

https://www.red-gate.com/products/smartassembly/index.htm

0

I don’t think that .NET programs can usually be turned into standalone programs because the .NET environment is designed to be separate from the program. However, did you consider installing the framework during installation using the redistributable .NET package? This will ensure that users have the latest version of .NET installed, if they have not already done so.

(I am associated with package 2.0 here, you may need a newer version.)

-1
source

Source: https://habr.com/ru/post/1706695/


All Articles