通过 C# 项目“使用”操作不一致

问题描述 投票:0回答:0

我的任务是承担一个旧项目(2019),但我们遇到了错误。

项目规格:

Unity Editor 2019.4.4f1
Project format *legacy*
VSCode as IDE
.NET Framework 4.7.1

错误本身:

A classic *The type or namespace 'Equipment' doesn't exist.* on the following line `using Equipment.MVCController`. The particularity here being that I get this error for a new file written by my coworker, but not older ones in the same folder calling the same namespace.

一些附录: 这是两个文件标题的图像。

DroneDisplay.cs
行所在的
using Equipment.MVCController
文件,以及新的
Blockchain.cs
一个:

这是文件层次结构的图像。

Equipment.MVCController
包含在
EquipmentController.cs
EquipmentDroneController.cs
EquipmentSuitController.cs
文件中。

我试过了,没有成功:

  1. 检查错别字。
  2. 检查所有框架目标是否调用相同的版本。它是,并且没有任何 Client Profile 在任何地方挥之不去。
  3. 更改文件中的编译顺序。不确定这是不是我所做的,但是将文件移入或移出文件夹似乎没有任何作用。
  4. 检查参考文献是否完成。好吧,我没有 References 文件夹(可能是因为项目格式是 legacy 而不是 SDK)。
  5. 检查是否安装了所有程序集和包。他们是,我删除了他们并重新下载了他们只是为了确定,没有结果。

Unity、.NET 和 C# 的新手,我可能遗漏了一些明显的东西。

c# .net unity3d
© www.soinside.com 2019 - 2024. All rights reserved.