无法加载System.Runtime.Extensions程序集,多种尝试后仍未解决
问题:Build时"CheckFileSystemCaseSensitive"任务失败,无法加载System.Runtime.Extensions程序集
构建项目时触发错误:CheckFileSystemCaseSensitive任务意外失败,提示找不到System.Runtime.Extensions, Version=4.0.10.0程序集或其依赖项。
已尝试以下操作但均无效:
- 从NuGet重装多个版本的相关程序包
- 重装Visual Studio 2022
- 将项目运行框架从.NET 4.7.2切换至.NET 4.8
- 在web.config中添加程序集绑定重定向配置:
<dependentAssembly> <assemblyIdentity name="System.Runtime.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-4.3.1" newVersion="4.3.1" /> </dependentAssembly>
- 移除Visual Studio安装中的Node.js开发组件
完整错误信息:
Severity Code Description Project File Line Suppression State Error The "CheckFileSystemCaseSensitive" task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.Extensions, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.Runtime.Extensions, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at TypeScript.Tasks.CheckFileSystemCaseSensitive.get_IsUnix() at TypeScript.Tasks.CheckFileSystemCaseSensitive.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. BinaNewWebApp
内容的提问来源于stack exchange,提问作者boruchsiper
相关产品推荐
相关产品推荐

