【问题标题】:"the imported project was not found. confirm that the path in the <import> declaration is correct"“未找到导入的项目。确认 <import> 声明中的路径正确”
【发布时间】:2016-11-29 20:55:52
【问题描述】:

我正在尝试从此处运行示例:https://github.com/Microsoft/Windows-universal-samples/tree/dev/Samples 在 Visual Studio 2015 Professional 上。 但是,当我尝试加载项目 CameraFrames.csproj 时,出现以下错误:

“未找到导入的项目“C:\Program Files (x86)\Windows Kits\10\bin\10.014332.0\XamlCompiler\Microsoft.Windows>UI.Xaml.Common.targets”。确认路径在声明中是正确的,并且该文件存在于磁盘上。C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.21\Microsoft.Windows.UI.Xaml.Common.targets"

我的系统上确实存在第二个文件,但第一个文件不存在。 我尝试编辑我的 CameraFrames.csproj 文件并添加了我系统上确实存在的文件。但这没有用。 (见下文) 第一个变化: <Content Include="C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.21\Microsoft.Windows.UI.Xaml.Common.Targets"> </Content> 2nd change: (after deleting the first change) <Reference Include= "Microsoft.Windows.UI.Xaml.Common"> <HintPath> C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.21\Microsoft.Windows.UI.Xaml.Common.Targets </HintPath> </Reference>

有什么想法吗?我被这个问题困扰了很长时间。 谢谢!

【问题讨论】:

  • 我使用的是 Windows 8
  • 这是最前沿的东西,SDK 和 Win10 版本仍处于测试阶段。它是否可以在Win8上运行也是相当值得怀疑的。很难看出路径是如何损坏的,这需要来自 MSBuild 而不是 SDK 目录。它可以去任何地方,然后您必须签出旧版本。
  • 非常感谢您的回答。我现在将升级到 Windows 10 并试一试。

标签: visual-studio-2015


【解决方案1】:

请修复 Visual Studio 并重新启动 PC。问题将得到解决。

我收到错误消息:“确认声明中的路径正确,并且该文件存在于磁盘上。”

我在 Windows 8 上的 Visual Studio 2015 项目 .Net 4.6 版本中遇到了同样的问题。尝试了很多东西,但最终修复了 VS 工作。 :)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-10
    • 2018-04-12
    • 2018-01-28
    • 2021-01-29
    • 2014-06-04
    • 1970-01-01
    相关资源
    最近更新 更多