r/visualbasic • u/AznBlusuazn • Aug 11 '21
How to embed and use references as resources?
Hello. Are you able to store a reference like “naudio” or “SQLite” into a VB app resource (references -> highlight reference -> do not copy // then add file -> select dll -> as embedded resource) and then call on it? I can get it to be embedded but how do I call on it and use it? Anyone have success in this? The objective is to avoid having the libs hanging out with the exe after build (or in a lib folder with something like pretty bin). Any help would be great. Thanks
2
u/ArbSoft Aug 17 '21
You can use a software called Smart Assembly from Red Gate, it does what you want and more (did you know that unless you obfuscate your code, it can be easily accessed from other apps like dotFuscator, eazFuscator, .Net Reflector (made by Red Gate again) etc? Basically all these apps can easily read your code, so you need to protect it with apps like Smart Assembly.
1
u/AznBlusuazn Aug 17 '21
Will definitely look at this. $1100 isn’t bad to protect your code. Thanks for the suggestion!!
1
2
u/RJPisscat Aug 11 '21 edited Aug 11 '21
I don't see any way to do this, but start with the why:
Are you trying to simplify deployment without an installer? Are you trying to hide a lib? Or something else?
Edit: Look at this article and see if it describes what you want.