I have a .NET Windows application that needs to call another .NET executable. I want to distribute this other exe as part of the main project, and was wondering what is the best way of implementing this. We don't want to take the code from this second exe and put it in the main project as we need the exe to effectively remain sealed, as we are also distributing it to third parties.
Options being considered:
- Should I add the exe as a file within the project and set Copy to Output as 'Copy always' and then just run it from the main application folder?
- Should I add the exe as a reference in the main project? If I do this how would I then call it as an executable with parameters?
I would be grateful for some guidance on the above approaches, and indeed if you have any other ways of achieving my goal.
Thanks!