最近在写C#,在使用Chocolatey安装ScriptCS(命令:choco install scriptcs)的过程中,出现以下报错:
ERROR: The term 'Write-ChocolateyFailure' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
The install of scriptcs was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\ScriptCs\tools\chocolateyInstall.ps1'.
See log for details.
尝试升级choco无果后,在choco的包浏览网站发现一个排名靠前的chocolatey-core.extension包,猜想可能scriptcs用到了一些扩展的方法,果断安装了,即把报错解决了。
解决方案:
安装完choco后,先安装扩展包
choco install chocolatey-core.extension
再安装scriptcs
choco install scriptcs
标签:chocolatey,ScriptCS,报错,install,scriptcs,安装,choco From: https://www.cnblogs.com/csxrzeng/p/18643174