Tom Wright
Tom Wright

Reputation: 11489

Bundling an (unmanaged, pre-compiled) executable with my output?

I'm writing a library that uses a command-line tool to prepare the environment. I know I could distribute them together, but the library functions as a module which the user will be moving around. I can foresee a lot of support issues being caused by people deleting the tool that they don't recognise, or failing to extract / copy it in the first place.

Hence my question:

Can I bundle an (unmanaged, pre-compiled) executable inside a class library?

Upvotes: 0

Views: 74

Answers (1)

Daniel Hilgarth
Daniel Hilgarth

Reputation: 174369

Sure. You can add it as a resource to your assembly, just like an image. When you need to use it, you can write it to a temporary folder on the disk and execute it from there.

Upvotes: 2

Related Questions