Solved

Application deployed via ClickOnce failed to start process for external executable

Posted on 2011-09-07
3
708 Views
Last Modified: 2013-12-12
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.
0
Comment
Question by:rkharko
  • 3
3 Comments
 
LVL 3

Author Comment

by:rkharko
ID: 36497075
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().
0
 
LVL 3

Accepted Solution

by:
rkharko earned 0 total points
ID: 36502853
The problem solved by manually editing the *.csproj file to add as content file for deployment this config file (that does not have file extension)
0
 
LVL 3

Author Closing Comment

by:rkharko
ID: 36503168
solved by me
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The viewer will learn how to set up a document for the web and print and the recommended PPI for printing.
Viewers will learn how to use the Hootsuite Dashboard.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now