Click here to Skip to main content
15,396,032 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having two projects test1 and test2 inside a single solution.
What my requirement is: I want to execute test2.exe from test1.exe
So what i have done is : I added test2.exe as a Resource to test1 and on
'test1-button_click' invoked the test1.exe,
but getting an exception "Could not load file or assembly myDll.dll" Even after i added the dll as a Resource inside test2.

What I have tried:

Tried by adding the dll to Resource folder and added that one as the Reference.

please help...
Updated 28-Dec-20 5:26am
Dave Kreskowiak 28-Dec-20 13:49pm
You cannot launch an executable out of Resources. It must be it's own file on disk for it to be launched. That includes any .DLL's the executable needs to run.

1 solution

Don't. Just add the files to the test1 project and use Process.Start to run it:
Member 14978771 28-Dec-20 13:35pm
Actually i need a shortcut of test2.exe on desktop too, that's why i added test2.exe as a Resource on Project test1. So using a simple Process.Start mightn't help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900