Visual C# command line compiler has stopped working - can't compile anything

3.5k views Asked by At

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.

0

There are 0 answers