l******9 发帖数: 579 | 1 【 以下文字转载自 JobHunting 讨论区 】
发信人: light009 (light009), 信区: JobHunting
标 题: biuld error of C# reference of namespace in two projects
发信站: BBS 未名空间站 (Tue Jul 15 21:35:45 2014, 美东)
I am doing C# programming on Visual Studio 2013 win 7.
in project 1 :
using test.name.abc; // error: type or namespace "test" cannot be found.
public class testName2 : testName1 // build error here
{
public int id;
}
in project 2 :
namespace test.name.abc
{
public class testName1
{
public int dd;
}
}
I have added reference of dll file generated from project2 in project1. I
also made the build dependence as project1 depends on project2.
But, I always got build error of
Error 10 The type or namespace name 'testName1' could not be found (
are you missing a using directive or an assembly reference?) C:my_pathmyFile
.cs
Any help would be appreciated. | p**********e 发帖数: 316 | 2 看上去没啥问题, 可以try这些
1) restart vs.net, 有时vs.net 会mad
2) 清空debug folder, 重新编译, 看2是不是copied over
3) 有可能是这个原因: 你确信project 2产生dll, property是build
4) 实在不行, delete重新码code
【在 l******9 的大作中提到】 : 【 以下文字转载自 JobHunting 讨论区 】 : 发信人: light009 (light009), 信区: JobHunting : 标 题: biuld error of C# reference of namespace in two projects : 发信站: BBS 未名空间站 (Tue Jul 15 21:35:45 2014, 美东) : I am doing C# programming on Visual Studio 2013 win 7. : in project 1 : : using test.name.abc; // error: type or namespace "test" cannot be found. : public class testName2 : testName1 // build error here : { : public int id;
| B********r 发帖数: 397 | |
|