Could not load file or assembly 'System.Security.Principal.Windows'

后端 未结 9 831
不思量自难忘°
不思量自难忘° 2021-02-06 20:29

Solution has compiled successfully, but after I added an existing class file to the project, this error appeared:

The specified task executable \"csc.exe\

9条回答
  •  故里飘歌
    2021-02-06 21:10

    None of the previous answers worked for me.

    The problem was that I didn't have the .NET Compiler Platform SDK installed.

    To solve, open Visual Studio Installer, choose "Modify", and under the "Invididual Component" tab, check the .NET Compiler Platform SDK, and confirm your changes by clicking "Modify".

    After I installed it and reopened Visual Studio, the problem is gone.

提交回复
热议问题