把旧的引用: using Microsoft.Practices.ServiceLocation; 替换为: using CommonServiceLocator; 如果还是报错 检查下nuget安装包是否安装了MVVMLight