2

I am getting an error of Visual C# command line compiler has stopped working

It's not the same as this one Visual C# command Line compiler has stopped working because that one says it happens with specific projects.. Clearly my one happens with any cs file. And it's not the same as this one Visual C# Command Line Compiler has stopped working? because that one identifies some dll file and mine doesn't.

C:\crp\a\a>file ff.cs
ff.cs; ASCII C++ program text, with CRLF line terminators

C:\crp\a\a>type ff.cs
using System;
class Program
{
    static void Main(string[] args)
    {

            Console.WriteLine("asdf");

    }
}
C:\crp\a\a>


C:\crp\a\a>csc ff.cs

I get an error

enter image description here

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: csc.exe
  Application Version:  4.0.30319.18408
  Application Timestamp:    5231171a
  Fault Module Name:    csc.exe
  Fault Module Version: 4.0.30319.18408
  Fault Module Timestamp:   5231171a
  Exception Code:   c0000005
  Exception Offset: 000000000000100c
  OS Version:   6.1.7601.2.1.0.256.1
  Locale ID:    3081
  Additional Information 1: 2bec
  Additional Information 2: 2bec2c842e9fdc07a30a541d052d8be9
  Additional Information 3: e9c6
  Additional Information 4: e9c6010076292bba25a974345e4cab26

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

--

Event viewer says

enter image description here

Faulting application name: csc.exe, version: 4.0.30319.18408, time stamp: 0x5231171a
Faulting module name: csc.exe, version: 4.0.30319.18408, time stamp: 0x5231171a
Exception code: 0xc0000005
Fault offset: 0x000000000000100c
Faulting process id: 0x2b0c
Faulting application start time: 0x01d0a96f97266ede
Faulting application path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe
Report Id: d4d33078-1562-11e5-809a-9c5ce0dc7059

--

C:\crp\a\a>where csc.exe
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe

C:\crp\a\a>

even just csc gives that error.

I could try restarting but i'm wondering if there is anything I can try prior to that.

Added

I commented on Jan 15 '16 at 16:21 to say "Solved here- http://stackoverflow.com/questions/30956834/why-is-csc-exe-crashing-when-i-last-left-the-output-encoding-as-utf8 " That question I linked to in comment is a later question which gets more to the point of where the problem is and got an answer.

Chris J then then asks if it's a possible duplicate of , and then he posts a link to exactly the same question that I did in the comment before his comment. (as if I didn't mention it or know of it, though I wrote that question and I mentioned it in comment right before his).

It's a slightly different question, but they have the same solution.

This question is a more general one because I didn't know of the cause.

Somebody might find this question useful if they haven't yet figured out that it was an encoding issue that was causing the crash.

Does that make it a duplicate or not? I think probably not, as the question is different and it can attract people searching for something different, but I don't know whether that'd then be considered a duplicate.

The answer for the other link, if applied to this one, would be assuming that the problem is one of encoding.. which would be quite an assumption to make. So the answers on the other one aren't necessarily quite so applicable to this one.

Those are the facts, whether based on that, it's considered a duplicate or not, I don't know, you tell me.

barlop
  • 12,887
  • 8
  • 80
  • 109
  • To be honest with you the first thing I would have done is to restart my computer to see if the problem persisted, if it does you most likely are looking at doing a virus scan and a reinstall of the compiler. – Mark Hall Jun 18 '15 at 03:09
  • @MarkHall It's a techie mentality thing.. Most likely a restart will fix it but ideal thing is if there is a solution that is quicker than a restart. if I restart it and the problem goes then it doesn't help other people or me finding a faster solution lest it happen again. Like how it's good to know about end tasking explorer.exe if that does the job of a restart for certain purposes. – barlop Jun 18 '15 at 03:25
  • I might restart it but if anybody has any ideas then next time it happens, if it happens, i'll try the idea. – barlop Jun 18 '15 at 03:30
  • If you are getting crashes like that something is seriously hosed up, it may be a one time non reproducible problem related to your current environment or something wrong in your file system. If you are not wanting to restart try a full virus scan and run ScanDisk to check your file system. – Mark Hall Jun 18 '15 at 03:30
  • it's rare from any program. And I haven't had that before from csc. the problem suddenly went away just now without a restart.. after I tried another csc though still got the same error. I clicked "look online for a solution" n it didnt say it found anything n it still gave the error.. then closed an autoplay window that was open from my nexus plugged in,then suddenly csc worked I replugged in my phone and the autoplay window came up. but csc still works.So whatevr triggered it makes no sense n whatevr made the problem go away makes no sense and is impossible to determine.can't reproduce it – barlop Jun 18 '15 at 03:35
  • Glad it corrected its self, hope you don't see it again. – Mark Hall Jun 18 '15 at 03:36
  • @MarkHall Do you think it's definitely not a RAM problem, that it's a hard disk problem? BTW since XP(i.e. over a decade), it has been called chkdsk not scandisk. – barlop Jun 19 '15 at 10:31
  • Solved here- http://stackoverflow.com/questions/30956834/why-is-csc-exe-crashing-when-i-last-left-the-output-encoding-as-utf8 – barlop Jan 15 '16 at 16:21
  • Possible duplicate of [Why is csc.exe crashing when I last left the output encoding as UTF8?](https://stackoverflow.com/questions/30956834/why-is-csc-exe-crashing-when-i-last-left-the-output-encoding-as-utf8) – Chris J Jun 15 '17 at 10:16

0 Answers0