Link to home
Start Free TrialLog in
Avatar of rkharko
rkharkoFlag for Ukraine

asked on

Application deployed via ClickOnce failed to start process for external executable

I have a desktop application configured for ClickOnce deployment. The Security Settings is "Full Trust". I have a feature in application that starts new process with another executable and then loads results produced by it into a text file. The logic is following I save input data into file 'input.txt' next I create new process and start it
 using (Process process = new Process())
	        {
	            // Stop the process from opening a new window
	            process.StartInfo.RedirectStandardOutput = true;
	            process.StartInfo.UseShellExecute = false;
	            process.StartInfo.CreateNoWindow = true;
	            process.StartInfo.FileName = graphvizFile;
	            process.StartInfo.Arguments = string.Format("-o \"{0}\" \"{1}\"", outputFilePath, inputFilePath);

	            process.Start();
	            process.WaitForExit();
	        }
	        File.Delete(inputFilePath);

Open in new window


This code does not work in deployed application (via build configuration "Deployment"), but works when I compile project with "Debug" or "Release" build configuration.
Avatar of rkharko
rkharko
Flag of Ukraine image

ASKER

I have now more information - the problem is with one configuration file that does not have extension and is ignored by ClickOnce during deployment and after installation on client machine this config file is messing and executable fails when process.Start().
ASKER CERTIFIED SOLUTION
Avatar of rkharko
rkharko
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rkharko

ASKER

solved by me