I have some code written in C# which uses an external DLL to run. I want to make that code run on another person's computer without installing it. I just want an exe that does all the work. Some programs have a portable version and have that behavior. How can I make a portable version of my code?
Asked
Active
Viewed 866 times
-2
-
What type of application is this? What runtime does it target? Does this run on Windows only, or other OSs as well? What have you tried so far? – gunr2171 Aug 23 '21 at 21:46
-
Only for Windows, i have tried an extension for Visual Studio but it creates an installer – Angel Carrillo Aug 23 '21 at 21:54
-
That was really helpfull THANKS :D – Angel Carrillo Aug 23 '21 at 22:11
1 Answers
0
You have to reference your dll and also add the .dll file in your project then mark it as Embedded Resource to not have to copy it on the destination PC. Here is an example :
https://www.codeproject.com/Articles/528178/Load-DLL-From-Embedded-Resource
If you don't want to relink the dll at each compilation (if the dll is your's), you can "Add existing file" then "Add as link" instead as "Add" (click on the arrow on the "Add" button) to add a link to your bin folder (of you dll project) instead of making a local copy of the dll.

KiwiJaune
- 530
- 2
- 16