Ervis Trupja
Ervis Trupja

Reputation: 2800

csc.exe has stopped working causes Server Error in '/' Application

When I run my application on VS2015 I get a window saying that csc.exe has stopped working like below:
enter image description here

After I click to close the program I get another error in the browser saying:

Server Error in '/' Application.

enter image description here

Detailed Compiler output looks like below:

C:\Program Files (x86)\IIS Express>D:_myURL\bin\roslyn\csc.exe /t:library /utf8output /nostdlib+ /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll"

What could be the issue?

Upvotes: 12

Views: 15901

Answers (6)

TheLegendaryCopyCoder
TheLegendaryCopyCoder

Reputation: 1832

]I found I had to end task "VBCSCompiler.exe" in TaskManager. There after I could successfully clean the solution /bin directory and the error disappeared.

enter image description here

Upvotes: 0

Aimal Khan
Aimal Khan

Reputation: 1019

I faced the same issue and I would suggest to follow the steps described here:

  • Close all instances of Visual Studio 2015 and if they don't do it automatically disappear, end tasks for all the VBCSCompiler processes.
  • In your Visual Studio project under Bin folder you will see a roslyn folder (new for VS 2015)
  • Delete the roslyn folder and all contents within.
  • Restart Visual Studio 2015
  • Re Build your project and all should be well again.

Upvotes: 29

Sathish
Sathish

Reputation: 2099

I too faced the same issue.After I delete files in the bin folder and run the application.The issue is fixed.

Upvotes: 1

Dinch
Dinch

Reputation: 612

Below steps are what i did and worked for me.

1. Remove virtual directory from the IIS.

  • Open IIS (Start -> Run -> inetmgr -> enter)

  • Find your project virtual directory (expand hostname -> Sites -> Default Web Site -> MyProjectName)

  • Delete the virtual directory (Right click -> Remove)

2. Create virtual directory again via the VS 2015

  • Switch to Visual Studio
  • Open project properties ( Right click to MyProjectName on the Solution Explorer -> Properties)
  • Open the Web tab from the left menu
  • Click Create Virtual Directory button Under the Servers section.

Run the project again and It's done.

Hopefully it helps to someone else.

Upvotes: 0

Fka
Fka

Reputation: 6234

For this kind of errors, I always go to Event Viewer eventvwr. Please expand Windows Logs and click Application.

enter image description here

If you cannot see your entry, you can easily filter it out - right click on Application and choose Filter Current Log. Check Critical, Warning and error and push OK. After that, you'll see detailed information in main view.

Upvotes: 0

DerpyDog
DerpyDog

Reputation: 37

-532462766 according to my efforts to help you, is an error that occurs when an unhandled exception is thrown.

I am sorry, i cannot help you much. My suggestion is to start debugging your program, by either using a debugger, or by wrapping some bits of your code in try-catch blocks, like in the example below:

try {
    // Your code here
} catch (Exception e) {
    System.Console.WriteLine("Error caught"); 
}

And your details are very vague. I can only help If you show the line/group of code causing the error.

However, the fact that csc.exe stops responding is intriguing, You can try to uninstall .NET Framework and reinstall it, you can find the downloads here: https://www.microsoft.com/net/download And if reinstalling it doesn't help, I am terribly sorry.

Upvotes: 0

Related Questions