I have error in my project on time of build csc.exe exited with code -2146232797 visual studio 2017(Professional) in other Team's computer project building and running fine, so I not want to update nuget compiler, Is there any permanent solutions there?
Asked
Active
Viewed 7,784 times
3
-
1What about the rest of the build log? I'm betting that describes the problem you're having in human-readable terms, instead of only a cryptic error code. (You can turn up the build verbosity in the preferences if the output window doesn't show enough detail.) – Jeroen Mostert Jul 04 '18 at 07:47
-
Maybe search for 0x80131623 ? – PepitoSh Jul 04 '18 at 08:03
-
It is nasty, the C# compiler decided to quit with Environment.FailFast(). Try it on a do-nothing C# source file, if it still fails then you know you have an install problem. Pretty likely. If not then comment out chunks of code to narrow down the trouble statement. – Hans Passant Jul 04 '18 at 08:54
-
Since this is the top result when searching for this error code, [I'm gonna link to this answer to a similar question](https://stackoverflow.com/a/63584334/3337288). The basic message being, check your code before reinstalling .NET. This would have saved me hours. – David Apr 12 '22 at 14:52
3 Answers
6
This issue happened for some people with vs 2017. you need to reinstall .net via
as requested and if the above link does not help, there is a thread in visual studio development community stating they fixed the issue in visual studio 2017 v15.5:
We have fixed this issue and it's available in Visual Studio 2017 version 15.5. Thank you for helping us build a better Visual Studio!
more over, there is another solution stating:
using the 2.2 compiler made the problem go away.

Barr J
- 10,636
- 1
- 28
- 46
-
1Press Windows+ R, in RUN type appwiz.cpl, then uninstall change window will come. Then find the Microsoft .Net Framework, repair it. This has fixed my issue for VS 2017. – Amar Gadekar Sep 04 '19 at 03:19
1
Multiple times I got this issue in VS 2019. I closed other VS projects and then build successfully.

the-a-monir
- 147
- 1
- 10
-
This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/29998316) – Hamed Hajiloo Oct 05 '21 at 10:54
-
1I got "csc.exe" exited with code -2146232797 msg (.NetFramework 4.7.2), and I wasted couple of hours to solve it but failed. If someone wants to save his hour while in rush in coding....so shared my way...thanks. – the-a-monir Oct 05 '21 at 12:06