I do not want to send my source file

I am using visual studio 2008. I want to share my program with others, but I do not want to send my source file. What file should I send and where can I find it. I have been told that I have to put the following files: .exe, .dll and .NET together in a zip file and send it to them.
Last edited on
Here's a video for Studio 2010, I hope the process is similar for you:
https://www.youtube.com/watch?v=ETdLZUJLAvE

Edit:
Here's the same process in written form, it looks like the VS2008 version does indeed have the same interface.
https://www.c-sharpcorner.com/UploadFile/996353/create-setup-and-deployment-project-in-visual-studio-200820/
Last edited on
Knowing what dependencies your executable has will help you determine what additional DLLs will be needed for distribution.

MS used to have the Dependency Walker app for this, but sadly it hasn't been updated in years. There is a non-MS rewrite and update available, Dependencies.

https://github.com/lucasg/Dependencies

There are x86 and x64 versions of the app available.

Fair warning, you may need to get (and install) newer VC++ redistributables than the ones provided by VS 2008 to use the Dependencies app. IIRC the Dependencies app requires the latest VC++ redistributables.

You could also include in your app setup the VS 2008 redistributables setup to ease someone using your app.
Another possible way to distribute your executable is to compile and link with a static build, so all the needed DLL code is stuffed into your .exe. I don't know if .NET allows for static builds, but you could try and then check out what dependencies are still hanging on afterwards.

A static build can be really bulked up in size, there are tradeoffs in file size between requiring VC++ redistributables or one massive and potentially bloated .exe.
Nope, .NET has no such thing as "static" builds.

The EXE files (assemblies) produced by .NET have a minimal ("fake") PE header that launches the .NET runtime (entry point _CorExeMain in mscoree.dll), whereas the actual program code is stored as CIL (Common Intermediate Language) code, similar to Java's bytecode.

The CIL code will be interpreted (or JIT-compiled) by the CLR (Common Language Runtime), similar to Java's JVM (Java Virtual Machine).

Also note that CIL byte code can be converted back to source code quite easily, for example with ILSpy:
https://github.com/icsharpcode/ILSpy

So, if you publish your .NET-based application as "compiled" EXE (or DLL) files, do not expect that this will "hide" your source code 😏

There are "obfuscators" that can make de-compiling your .NET application harder, though:
https://www.eziriz.com/dotnet_reactor.htm


MS used to have the Dependency Walker app for this, but sadly it hasn't been updated in years. There is a non-MS rewrite and update available, Dependencies.

https://github.com/lucasg/Dependencies

There are x86 and x64 versions of the app available.

...neither of which helps with .NET assemblies though, because they only look at the "fake" PE header, not at the actual CIL code.

There are some tools similar to "Dependency Walker" for .NET assemblies:
* https://www.workshell.co.uk/products/netdepends/
* https://github.com/dandrejvv/AssemblyInformation
Last edited on
Topic archived. No new replies allowed.