NuGet.targets (100): 无法找到包的版本“4.0.20710.0”

NuGet.targets (100): Unable to find version '4.0.20710.0' of package

我正在使用 VS 2012 和 TFS 2010。 最近我的电脑从 windows 7 升级到 windows 8。 当我从 TFS 卸载我的应用程序并尝试构建它以部署到测试服务器时,我收到了这些错误消息。 在这些错误消息下方,我收到警告(重复多次):"EXEC : warning : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel." 我如何获得干净的构建?

我在 SO 上找到了 ChristianDev 的答案,就是去 工具 -> Nuget 包管理器 -> 包管理器设置 -> 包管理器 -> 包源 然后添加一个新的可用包源,将 https 替换为 http。 不使用安全 url 可能要付出代价,但它确实有效。 参见 Visual Studio 2010 nuget error: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel

我应该补充一点,我更喜欢更好的解决方案。