c# - Visual Studio 2017 building to hololens error CS0246 "The type or namespace name ' UnityPlayer' Could not be found”

标签 c# visual-studio unity3d visual-studio-2017 hololens

我是 visual studio 的新手。欢迎所有帮助。

我正在构建一个非常基本的场景,只是一个使用 unity3d 在 hololens 中显示的立方体。从统一没有问题,按照提供的教程逐步进行。在 Visual Studio 中打开 sln 文件时,会弹出此错误。

使用 Unity 5.6.4f1 和 Visual Studio 2017 15.3

我遇到了这个错误。 “无法找到类型或命名空间名称‘UnityPlayer’”以及下面所附图片中的一些类似内容。

Error list

我已经尝试过在我用谷歌搜索过的类似问题中提到的一些事情。

  • 我使用 x86 构建,尝试过 ARM 构建、调试和发布
  • 尝试过 Unity 5.4.0、5.5.0、5.6.2、5.6.3
  • 在 unity 中双重检查build设置
  • 已安装 Unity 游戏开发
  • 已检查 windows 10 sdk(已安装 10.0.10240、10.0.10586、10.0.14393)
  • 尝试过 visual studio 2015
  • 将 visual studio 降级到 2017v15.2 和 2017v15.0
  • 获得最新的网络框架

最佳答案

使用Unity 2017.1.0p5和最新版本的VS2017。

在 VS 的新更新后,Unity 在最旧版本上有错误

关于c# - Visual Studio 2017 building to hololens error CS0246 "The type or namespace name ' UnityPlayer' Could not be found”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46804195/

相关文章:

unity3d - 如何获得父游戏对象的大小?

c# - 统一: Can't find UI Layout Element Max Size

c# - ASP.NET Designer.xx 生成 'already contains a definition for' 控件错误

javascript - 使用 jQuery 序列化 MVC 表单

c# - 'Timer' 上的错误是 'System.Windows.Forms.Timer' 和 'System.Threading.Timer' 之间的模糊引用

c++ - 如何设置 VS2008 以进行高效的 C++ 开发

c# - 英语国家的 Windows Phone 本地化

c# - 如何导入 Manzana C# 库

c++ - 我应该将 .vcxproj.filter 文件添加到源代码管理吗?

dll - 重命名外部 dll 中的类,而不会在 unityEditor 中丢失对它的引用