我有VS 2003 ASP.NET Web应用程序,当我在调试模式下执行构建/重建解决方案时,它会完美地编译和构建,没有错误,
但是当我将模式更改为发布并尝试执行构建解决方案或重建解决方案时,我引用的各种DLL出现以下编译错误。
我已将命名空间的名称替换为通用xyz
未能找到类型或命名空间名称“xyz”(是否缺少using指令或程序集引用?)
我所有的引用都是正确的,我能够在调试模式下编译,没有任何错误。
我的操作系统是Windows Vista
有谁知道为什么我在发布模式下会收到这个错误,以及这个问题的可能解决方案吗?
以下是输出窗口中的示例
我已更改文件名,但未更改实际错误
------ Rebuild All started: Project: XYZ, Configuration: Release .NET ------
Preparing resources...
Updating references...
Performing main compilation...
C:\xyz\a.cs(4,7): error CS0246: The type or namespace name 'ToolLib' could not be found (are you missing a using directive or an assembly reference?)
C:\xyz\a.cs(5,7): error CS0246: The type or namespace name 'ToolLib' could not be found (are you missing a using directive or an assembly reference?)
C:\xyz\a.cs(4,7): error CS0246: The type or namespace name 'ToolLib' could not be found (are you missing a using directive or an assembly reference?)
C:\xyz\a.cs(5,7): error CS0246: The type or namespace name 'ToolLib' could not be found (are you missing a using directive or an assembly reference?)
C:\xyz\a.cs(4,7): error CS0246: The type or namespace name 'ToolLib' could not be found (are you missing a using directive or an assembly reference?)
C:\xyz\a.cs(4,7): error CS0246: The type or namespace name 'ToolLib' could not be found (are you missing a using directive or an assembly reference?)
c:\xyz\b.cs(4,7): error CS0246: error CS0246: The type or namespace name 'Globals' could not be found (are you missing a using directive or an assembly reference?)
c:\xyz\c.cs(5,7): error CS0246: The type or namespace name 'ToolLib' could not be found (are you missing a using directive or an assembly reference?)
c:\xyz\d.cs(4,7): error CS0246: The type or namespace name 'Logger' could not be found (are you missing a using directive or an assembly reference?)
..........
and so on
----------
Build complete -- 26 errors, 0 warnings
Building satellite assemblies...
Satellite assemblies could not be built because the main project output is missing.
1条答案
按热度按时间tf7tbtn21#
我关闭了解决方案并删除了与解决方案关联的.suo文件,然后再次打开解决方案,我能够在调试和发布模式下进行编译。
我没有更改解决方案中的任何其他内容。
谢谢大家的意见。