部署SharePoint Solution过程中因某些原因不能用Update-SPSolution。于是retract,remove。然后用PowerShell来Add-SPSolution,Install-SPSolution。
PowerShell窗口没有报错,但某些资源在安装后不能找到。怀疑没有完成安装。去central admin查看farm solutions,果然报错:
Cannot add the specified assembly to the global assembly cache
原来DLL的安装halt在C:\windows\assembly\temp(用cmd可以看到)。想用命令删除目录,但由于process不能被kill掉无法删。
最好的办法是重启timer service,然后iisrest,重新用PowerShell安装成功。
如果遇到"Cannot add the specified assembly to the global assembly cache"
见 http://blog.csdn.net/snleo/article/details/45424261