在解决方案中添加现有项目 - 导致引用命名空间错误

Add existing project in a solution - cause reference namespace error

我刚刚创建了一个新项目。然后在该新项目中添加一个现有项目。 问题是在完成添加现有项目之后。所有参考文献均丢失错误。

只是想知道。我添加的现有项目已添加到另一个项目中并使用 "restore nuget package"

出现以下错误:

"Some NuGet packages are missing from this solution. Click to restore from your online package sources"

但在尝试恢复包后,我收到以下新消息:

"All packages are already installed and there is nothing to restore."

两者使用相同的框架版本 - 4.5.2

我终于找到了解决办法。这是因为我用 VS 2015 打开解决方案,但我添加的项目是用 Visual Studio 2013 创建的,我认为 nuget 包有一些错误,用于将包从 VS 2013 恢复到 VS 2015

  1. 首先使用(Visual Studio 2013)我创建引用项目的软件打开我的解决方案
  2. 单击解决方案
  3. 中的选项"Restore the nuget package"
  4. 2015 年 Visual Studio 重新打开解决方案,然后享受 ^^