【发布时间】:2011-09-29 06:34:37
【问题描述】:
我有一个 C# 解决方案和一些引用的 dll-s。即使在 Visual Studio(vs2010) 中编译时它显示为成功,但使用 C# 编译器时它失败:显然缺少 dll..
csc /t:library /out:test.dll test.cs
test.cs(22,10): error CS0246: The type or namespace name
'Attribute' could not be found (are you missing a using directive
or an assembly reference?)
有人知道为什么会这样吗?
【问题讨论】:
-
您是否修改了默认响应文件? (csc.rsp.cfg 或类似的东西)。如果这是一个简短的测试程序,你能给出代码吗?我认为您要查找的只是 System.Attribute?
-
@Jon Skeet 它不是 system.attribute,我在将其粘贴到此处时缩短了名称..引用的文件是另一个 dll,之前测试为工作..我确实修改了响应文件..不工作..
标签: c# visual-studio-2010 c#-4.0 csc