无法加载文件或程序集"System.Security.Principal.Windows" [英] Could not load file or assembly 'System.Security.Principal.Windows'

查看:106
本文介绍了无法加载文件或程序集"System.Security.Principal.Windows"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案已成功编译,但是在我将现有的类文件添加到项目中之后,出现了此错误:

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

无法运行指定的任务可执行文件"csc.exe".不能加载文件或程序集'System.Security.Principal.Windows,版本= 4.0.1.0,文化=中性,PublicKeyToken = b03f5f7f11d50a3a'或它的依赖项之一.系统找不到文件指定的.MvcApplicationRegister

The specified task executable "csc.exe" could not be run. Could not load file or assembly 'System.Security.Principal.Windows, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. MvcApplicationRegister

我通过NuGet安装了 System.Security.Principal.Windows 包,但是仍然出现错误.

I installed System.Security.Principal.Windows package By NuGet, but error still appears.

推荐答案

将Microsoft.Net.Compiler从2.8.2升级到2.9.0后,我遇到了同样的问题.我降级到2.8.2之后,编译的项目没有任何错误.

I had the same issue after I upgraded Microsoft.Net.Compiler from 2.8.2 to 2.9.0. After I downgraded to 2.8.2 projects compiled without any errors.

这篇关于无法加载文件或程序集"System.Security.Principal.Windows"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆