✅ Extracting files that are in your project into a certain directory when compiled into an exe file?
17 Replies
You need to set the files as embedded resources, get their manifest resource stream, and copy that stream to a specified output stream
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
I think i gave you enough things to Google
pyfile.py -> Right Click -> Properties -> Build Action: "Embedded resource"
Hey yeah let's spoon feed from chatgpt
wasnt from chat gpt though 

Writing out type names with namespaces and using old using statements says otherwise
Well, he's likely a new person to C#, will likely get stuck at "Where is this from, why compile error?"
To avoid that convo, type out the full namespace
same exact thing goes for
though if u have that little faith, u do u
Or just add it as a using...? You're missing
using System.Linq;
as well so, completely pointless
Just don't spoon feed a complete solution
Finding a solution to something as simple as this is an essential skill to learn for beginners
You don't learn anything by just copy pastingNot many ppl care about reflection enough to go read 10 docs pages about it and 5 yt videos to complete a simple thing
It's like 3 Google searches. How to set it as an embedded resource, how to get the resource stream (i literally even spelled it out so they can search it easier), and how to copy it to an output stream
It's really not that hard to Google that. The first result of each of those searches will probably be good enough
You wouldnt be giving much help when u just say "Just google it" though, at that point i would actually just recommend to sign up for openai and ask chatgpt everything
"How do i do x in c#?"
just google it
There are things that warrant that. This is one of those things
I'll agree to disagree
<:poi_shrug:582941309174546569>
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
if you dont specify an absolute path, it uses a relative path
which is the Working Directory iirc
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View