我有VS2003 ASP.NET Web应用程序,当我在调试模式下执行构建/重建解决方案时,它可以完美地编译和构建,没有错误,
但是当我将模式更改为Release并尝试执行构建解决方案或重建解决方案时,我正在跟踪我引用的各种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.
答案 0 :(得分:1)
我关闭了解决方案并删除了与解决方案相关的.suo文件,并再次打开了解决方案,我能够在调试和发布模式下进行编译。
我没有改变解决方案中的任何其他内容。
感谢所有人的意见。