I am able to obfuscate a .dll in my visual studio solution upon running it. 
The problem is that I have no idea how this can be done upon publishing the application into an .exe. Because the source code of the dll inside the published exe can still be seen with a de-obfuscator.
Could someone help me out please? Thanks in advance.
I just found the solution. By installing Obfuscar Global Tool and adding the following code to my .csproj file.
This allowed me to change the dll file on publish.
Thanks everyone for helping me solve this. I really appreciate it!