visual-studio - 在 Release模式下执行构建/重建解决方案时,VS2003错误

标签 visual-studio build compiler-errors

我有VS2003 ASP.NET Web应用程序,当我在 Debug模式下执行构建/重建解决方案时,它可以编译并完美构建而没有错误,

但是,当我将模式更改为“发布”并尝试执行“生成解决方案”或“重建解决方案”时,我正在跟踪我所引用的各种dll的编译错误。

我已用通用xyz替换了 namespace 的名称

找不到类型或 namespace 名称“xyz”(您是否缺少using指令或程序集引用?)

我所有的引用都是正确的,并且能够在 Debug模式下编译而没有任何错误。

我的操作系统是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.

最佳答案

我关闭了解决方案,并删除了与解决方案关联的.suo文件,然后再次打开了解决方案,并且能够在调试和 Release模式下进行编译。

我没有更改解决方案中的其他任何内容。

谢谢大家的评论。

关于visual-studio - 在 Release模式下执行构建/重建解决方案时,VS2003错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4230673/

相关文章:

visual-studio - 我们如何像在 Visual Studio 中一样保存 (VSCode) 中的所有文件

visual-studio - 如何在解决方案之间移动现有的 VS 项目?

groovy - 从外部将项目添加到构建层次结构的一部分

Android 发布构建错误 : "The value for this property cannot be changed any further."

c# - 使用未分配的局部变量 “SHELLEXECUTEINFO”

java - 尝试使 JTable 中的链接可单击时出现未处理的异常类型 URISyntaxException

visual-studio - 从命令行禁用 msvsmon 超时

C 没有 bool 值?还有VS2010的问题

amazon-web-services - 将 VSTS Build 与 AWS 结合使用的最简单方法是什么?

java - 在单元测试中无法解决类型错误