Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8634233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:40:32+00:00 2026-06-12T09:40:32+00:00

I would love to have a little problem solved. I know that it’s not

  • 0

I would love to have a little problem solved. I know that it’s not the best way to debug a piece of code with possible warnings, but I love to debug all the time when I have a little break between to ideas. I just found out about mono and the possibility to compile C# code running on Mac OS X Mountain Lion. I integrated it in the CodeRunner app, and it works without any problems. However, if there appears a warning in the code, it does not work.

For example, I tried to compile a code that creates one integer (nothing more than that) and it was not debugging because of that warning. I’m getting this error message:

Untitled.cs(9,29): warning CS0219: The variable `test' is assigned but its value is never used
Cannot open assembly 'Compilation succeeded - 1 warning(s)
Untitled.exe': No such file or directory.

Someone may know how to deal with that. I know it’s not an essential feature, but I would love to debug the code even with some unused variables.

The content of the compilation script file:

#!/bin/bash

enc[4]="UTF8"            # UTF-8
enc[10]="UTF16"            # UTF-16
enc[5]="ISO8859-1"        # ISO Latin 1
enc[9]="ISO8859-2"        # ISO Latin 2
enc[30]="MacRoman"        # Mac OS Roman
enc[12]="CP1252"        # Windows Latin 1
enc[3]="EUCJIS"            # Japanese (EUC)
enc[8]="SJIS"            # Japanese (Shift JIS)
enc[1]="ASCII"            # ASCII


rm -rf "$4"/csharp-compiled
mkdir "$4"/csharp-compiled
#mcs is the Mono CSharp Compiler

file="$1"
length=${#file}
first=`expr $length - 3`
classname=`echo "$file" | cut -c 1-"$first"`
#echo -out:"$4"/csharp-compiled/"$classname".exe "$1"
dmcs -out:"$4"/csharp-compiled/"$classname".exe "$1"
status=$?

if [ $status -ne 0 ]
then
exit $status
fi

#echo "$4"/csharp-compiled/

currentDir="$PWD"
cd "$4"/csharp-compiled/
files=`ls -1 *.exe`
status=$?
if [ $status -ne 0 ]
then
exit 1
fi

cd "$currentDir"
for file in $files
do
mv -f "$4"/csharp-compiled/$file "$file"
done

# Otherwise output the name of the input file without extension (this should be the same as the class name)
file="$1"
length=${#file}
first=`expr $length - 3`
classname=`echo "$file" | cut -c 1-"$first"`
echo $classname".exe"
exit 0
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:40:33+00:00Added an answer on June 12, 2026 at 9:40 am
    dmcs -out:"$4"/csharp-compiled/"$classname".exe "$1"
    

    dmcs puts some messages on stdout, and some on stderr. CodeRunner expects stdout to only contain the output file name, nothing else, so to make that happen, >&2 can be used to redirect everything else to stderr.

    dmcs -out:"$4"/csharp-compiled/"$classname".exe "$1" >&2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would love to get some tips from other people that have had this
Ok here's a little problem I would love to get some help on. I
I would love to sort an embedded MongoDB object using PHP Lithium. I have
I have a c# windows form project using watin. I would love to attach
Would love some opinions on this problem I'm trying to workout. I'm trying to
Working on a movie website and would love to find an API that I
Edited to make my requirements a little more clear I would love to find
Is there a way to have the parent that spawned a new thread catch
I have a little problem with a Listview. I can load it with listview
I would dearly love to get rid of the hideous EDMX blob that we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.