This question already has an answer here:
(这个问题在这里已有答案:)
I have a C#
solution with several projects in Visual Studio 2010
.
(我有一个C#
解决方案,在Visual Studio 2010
有几个项目。)
One is a test project (I'll call it " PrjTest "), the other is a Windows Forms Application
project (I'll call it " PrjForm "). (一个是测试项目(我将其称为“ PrjTest ”),另一个是Windows Forms Application
项目(我称之为“ PrjForm ”)。)
There is also a third project referenced by PrjForm, which it is able to reference and use successfully. (还有一个由PrjForm引用的第三个项目,它能够成功引用和使用。)
PrjForm references PrjTest , and PrjForm has a class with a using
statement:
(PrjForm引用PrjTest , PrjForm有一个带有using
语句的类:)
using PrjTest;
- Reference has been correctly added
(参考已正确添加)
-
using
statement is correctly in place (using
语句正确到位)
- Spelling is correct
(拼写是正确的)
- PrjTest builds successfully
(PrjTest构建成功)
- PrjForm almost builds, but breaks on the
using PrjTest;
(PrjForm几乎构建,但打破了using PrjTest;
)
line with the error: (与错误一致:)
The type or namespace name 'PrjTest' could not be found (are you missing a using directive or an assembly reference?)
(找不到类型或命名空间名称'PrjTest'(您是否缺少using指令或程序集引用?))
I've tried the following to resolve this:
(我尝试过以下方法来解决这个问题:)
- Removed Resharper (since Resharper had no trouble recognizing the referenced project, I thought it might be worth a shot)
(删除了Resharper(因为Resharper在识别引用的项目时没有遇到任何麻烦,我认为它可能值得一试))
- Removed and re-added the reference and using statement
(删除并重新添加了引用和using语句)
- Recreated PrjForm from scratch
(从头开始重新创建PrjForm)
- PrjForm currently resides inside the PrjTest folder, I tried moving it to an outside folder
(PrjForm目前驻留在PrjTest文件夹中,我尝试将其移动到外部文件夹)
- Loaded the solution on a different computer with a fresh copy of
VS 2010
(使用VS 2010
的新副本在另一台计算机上加载解决方案)
I have done my homework and spent far too long looking for an answer online, none of the solutions has helped yet.
(我做完了我的功课,花了很长时间在线寻找答案,但没有一个解决方案有帮助。)
What else could I try?
(我还能尝试什么?)
ask by Anders translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…