Running DotNet Console app

General discussion of the Co:Z Toolkit
Post Reply
RobWunderlich
Posts: 7
Joined: Wed Mar 26, 2008 3:58 pm

Running DotNet Console app

Post by RobWunderlich »

I'm trying to run a DotNet console app via CoZLauncher. My CoZ setup appears correct as I can issue commands such as LS and receive output back in stdout.

I've create a simple console application that writes a couple lines to the console and writes a small text file to disk. I ca succesfully run the program from a cygwin bash shell. When launched by CoZ, I don't get any output in STDOUT and the test file is not written. No error messages.

The app is a "CickOnce" online app.

Any suggestions to start debugging?

Thanks,
Rob Wunderlich
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Rob,

This is really curious, since the Co:Z Launcher will run your script under the cygwin bash shell also (assuming that bash is the default login shell for the user that you are connecting to via SSH). Can you do this manually under the cygwin bash shell:

myprog > consoleout.txt

This to me would prove that the console messages from "myprog" are indeed going to stdout if they show up in the consoleout.txt file.

Are you sure that you are even running the program from your Co:Z Launcher script? Perhaps write a shell wrapper for your program like:

#!/bin/sh
echo "before running myprog"
myprog
echo "after running myprog, exitcode=$?"

and run this script manually and from the Co:Z Launcher.
RobWunderlich
Posts: 7
Joined: Wed Mar 26, 2008 3:58 pm

Post by RobWunderlich »

I think the program is not really running. I changed from a "ClickOnce" deployment to a stand-alone exe deployment and it works fine. The expect STDOUT is received.

The ClickOnce deploy checks for updates before running. I suspect that part is failing and the app never runs. The ClickOnce throws up a little graphic status window and perhaps that's where it's failing when running headless through Co:Z.

So I've got a workaround for the moment by using a stand-alone exe.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

I don't know dot.net or what a ClickOnce app is, but if the app displays a Windows dialog, then it doesn't sound like a true Windows console app. So, I think you are right - running under the bash shell via Co:Z Launcher probably will generate an error for a non-console app.
Post Reply