• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Package a DLL into an EXE?

JonTheBaller

Golden Member
I want to integrate a DLL I made into an executable, is this possible? Also, if the program was written in .Net, does a computer need the .Net framework installed to run it?
 
That defeats the purpose of using a dll in the first place. If you really want to, you can see if you can statically link it, but the resulting binary will be a lot bigger. It's generally smarter to just make sure the target machine has the shared library.

You can have programs done in VS.NET that don't require .NET, but it depends on how it's compiled.
 
You should really just use the DLL as it is, don't package it with the exe. Use standard practices so that your code is easy to understand and maintain. If you did do this, say by importing the dll in as a resource, you'd just end up exporting the dll out in your code anyway.

The target computer will need to have the .net framework installed in order for your program to run. Regarding the previous poster's commend, I don't see how it's possible to run a .net exe without the .net framework. Do you have any more information about that?
 
He said VS.NET, so perhaps he's referring to *unmanaged* C++. There is no way to load a .NET application sans the framework.

To answer the original poster's question, no, you cannot package it as an executable; there's nothing to execute! The application type exe/winexe in .NET has to have an entry point, not surprisingly named Main. No main, no entry point, no point of execution. Why not simply create a Win Forms/Console app that references the assembly you created and delegate as necessary?

 
Back
Top