“Csc.exe” exited with code -1073741819

2020-08-24 02:16发布

问题:

Everytime I try to run my code, I am having this error that "Csc.exe" exited with code -1073741819 , I cleaned my solution and restarted Visual Studio with no gain. Can anyone help me?

回答1:

I faced same problem. Delete the bin and obj folder in project(s). The try to clean and rebuild the solution. This worked for me.



回答2:

Cleaning and rebuilding the solution will sometimes solve the issue and sometimes won't.

You need to repair Visual Studio. Go to Control Panel -> Programs. Then select your version of Visual Studio you are using and press "Change"(or right click it and press "Change"). When the setup appears, click "Repair".

This solved it for me and several others who have been facing this issue.



回答3:

For the problem csc-exe-exited-with-code-1073741819

I repaired Visual C++ 2015 Redistributable (x86). This worked for me.repair Visual C++ 2015 Redistributable. I found about this problem when uninstalling and then reinstalling VS2015. After the setup is completed it says that some items are not installed correctly. And among them is Visual C++ Redistributable for Visual Studio 2015 not installed correctly.

So after a while I repaired Visual C++ Redistributable 2015. Here is the link Visual C++ Redistributable for Visual Studio 2015.



回答4:

I want to share my experience here because I had this problem for several days (with VS Studio 2012) and I had MANY MANY difficulties to find the solution !

And my problem was... That I had a virus/malware problem, and the faulty module was BITGUARD !

So if someone has this problem, and goes here searching the solution, I think you must try any free Malware remover program to see if Bitguard should not be your problem !

Regards,

Olivier.



回答5:

I also had this problem, and luckily found a solution.

First off is more of a workaround, but seemed to work. Disable parallel build in Visual Studio (Tools -> Options ->Projects and Solutions -> Build and Run. Change maximum number of parallel builds to 1). This resolved the issue for me, but did not solve the problem.

The issue I had, as obscure as it is, was I had Razer Synapse set up to record mouse and keyboard stats on Visual Studio. Once I disabled this, everything worked perfectly.



回答6:

When our company changed anti-virus software, an application that had not been touched in months suddenly started having the build error "csc.exe" exited with code -532462766..

I used our new AV client to scan the bin folder of the application that wouldn't build. The AV client claimed it was infected with W32.Trojan.Genkd. Uninstalling that AV software allowed it to build as usual. I think a single file got quarantined, preventing the build.

Your options may be these:

  • disinfect the files (assuming it's an actual infection)
  • unquarantine the "infected" files (assuming it's actually safe)
  • uninstall / disable that AV client
  • change AV software

Lastly, you could always comment blocks of code to identify what is causing the false-positive.



回答7:

I got this error when running from the devenv command. Adding /SafeMode to the command arguments solved my issue which lead me to think one of my install extension/plugins for VS2015 was to blame.



回答8:

  1. classic ms solution: restart computer :D
  2. delete bin and obj folders
  3. open vs
  4. build

it should work.