Solved

Application deployed via ClickOnce failed to start process for external executable

Posted on 2011-09-07
3
704 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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

A list of useful business intelligence software.
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.
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

760 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

23 Experts available now in Live!

Get 1:1 Help Now