locked
Distributing Applications that use User Controls / Linking DLLs to a single EXE-file RRS feed

  • Question

  • Hello,

     

    recently I developed a user control (called PPGanttChart) in Visual C# in Visual Studio 2005 Professional Edition. I use this user control PPGanttChart on a Windows Form of another project developed in C# (called GUI).

     

    My problem is the following: I want to distribute the application GUI over the internet but Visual Studio builds an EXE "GUI.exe" and a DLL "PPGanttChart.dll" corresponding to the user control PPGanttChart. The application does not work without the DLL but I do not want to distribute the DLL with the application in order to prevent others from using the extensive technology provided by the user control PPGanttChart. In other words: If I provide the DLL with the EXE, then everybody can use the user control, but I only want to provide the finished application GUI which makes use of the user control, so I would like to embed/link the DLL to the EXE file, e.g. I would appreciate one single EXE file.

     

    I am very thankful for suggestions concerning my problem or alternative solution strategies, as I after a lot of research did not find a suitable solution.

     

    Thanks in advance.

     

    Sincerely,

    Daniel Warner

    Thursday, March 29, 2007 6:05 PM

Answers

  • Check this blog post.
    Thursday, March 29, 2007 7:32 PM
  • Hi

     

    A word of warning, your code will still not be safe.  By having the binaries, knowledge developers can reverse-engineer your code using any number of tools (anakrino or ILDASM comes to mind).  As such, any .net binary is the same as .net source code.  It is open.  They'll be able to hack it to it and grab the bits they want.

     

    To fully protect the IP developed, I recommend using an obfuscation technology.  We use dofuscator where I work.  Check it out at www.preemptive.com.

     

    Obfuscation works by renaming the code (in your binaries) to meaningless garble (class a, class b, class aa, etc.)  As such, it is hard to figure what

     

    a.a = b.c + c - d.e

     

    but the following code is alot more explicit

     

    gantchart.width = label.left + height - control.width

    I like the ILMerge though, never heard of it and it sounds nifty.

     

    Cheers

     

    Nic

    Friday, March 30, 2007 6:07 AM

All replies

  • Check this blog post.
    Thursday, March 29, 2007 7:32 PM
  • Hello,

     

    thanks a lot, that was exactly the tool I was looking for! :-) Although I'm still wondering why this feature isn't integrated into Visual Studio.

     

    Sincerely,

    Daniel Warner

    Friday, March 30, 2007 12:19 AM
  • Hi

     

    A word of warning, your code will still not be safe.  By having the binaries, knowledge developers can reverse-engineer your code using any number of tools (anakrino or ILDASM comes to mind).  As such, any .net binary is the same as .net source code.  It is open.  They'll be able to hack it to it and grab the bits they want.

     

    To fully protect the IP developed, I recommend using an obfuscation technology.  We use dofuscator where I work.  Check it out at www.preemptive.com.

     

    Obfuscation works by renaming the code (in your binaries) to meaningless garble (class a, class b, class aa, etc.)  As such, it is hard to figure what

     

    a.a = b.c + c - d.e

     

    but the following code is alot more explicit

     

    gantchart.width = label.left + height - control.width

    I like the ILMerge though, never heard of it and it sounds nifty.

     

    Cheers

     

    Nic

    Friday, March 30, 2007 6:07 AM
  • Hi Nic,

     

    that indeed sounds very reasonable to me. So probably I should first obfuscate and then use ILMerge. Thanks for your advice!

     

    Cheers,

    Daniel Warner

    Saturday, March 31, 2007 12:26 PM