Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Application deployed via ClickOnce failed to start process for external executable

Posted on 2011-09-07
3
Medium Priority
?
719 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Invest in your employees with these five simple steps to improve employee engagement and retention.
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
Viewers will learn how to use the Hootsuite Dashboard.

722 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