Visual Studio Project out of date(Visual Studio 项目已过期)
问题描述
我一直在尝试让 Visual C++ 工作,但是在构建每个项目时我都收到此错误:此项目已过期"您要构建它吗?"每次都无法构建.
I've been trying to get Visual C++ working, but I'm getting this error when building every project: "This project is out of date" "Would you like to build it?" It fails to build every time.
当我重建时,构建仍然失败,尽管在记录器中我没有注意到任何错误消息,这让我认为它没有正确记录(我正在使用第三方程序来记录).
When I rebuild, the build still fails, although in the logger I don't notice any error messages, which makes me think its not logging properly (I'm using a third party program to log).
我已按照此处的一些说明进行操作:http://blogs.msdn.com/b/vsproject/archive/2009/07/21/enable-c-project-system-logging.aspx 并启用日志记录.
I've followed some of the instructions here: http://blogs.msdn.com/b/vsproject/archive/2009/07/21/enable-c-project-system-logging.aspx and enabled logging.
我收到此错误:项目不是最新的,因为在此处插入文件名".lastbuildstate 丢失.请注意,在实际的 Visual Studio 中,没有记录任何内容.我无法在谷歌中找到任何关于此的内容.可能是我错误地启用了日志记录,但我觉得这是错误.
I'm getting this error: project not up to date because "insert file name here".lastbuildstate is missing. Note that in actual visual studio, there is nothing logged. I was unable to find anything on this in google. It may be that I incorrectly enabled logging, but I feel that this is the error.
推荐答案
你应该让 Visual Studio 告诉你为什么它需要重建.Visual Studio 2015 已内置对此的支持:
You should let Visual Studio tell you why it needs to rebuild. Visual Studio 2015 has built in support for this:
- 工具(菜单)
- 选项
- 项目和解决方案
- 构建和运行
将 MSBuild 项目构建输出详细程度更改为 详细 或诊断.
Change MSBuild project build output verbosity to Detailed or Diagnostics.
在我的例子中,它打印了一条这样的消息:
In my case it printed a message like this:
1>------ Up-To-Date check: Project: xyz, Configuration: xyz ------
1>Project not up to date because build input 'C:wsMissing.h' is missing.
...并从项目中删除该标题解决了问题.
... and removing that header from the project fixed the problem.
要在较旧的 Visual Studio 版本中获取此信息,您需要使用 DebugView 并修改 devenv.exe.config
(请参阅 Colin Smith 的回答:https://stackoverflow.com/a/21759835/1941779).请注意,此解决方案不适用于 Visual Studio 2015.
To get this information in older Visual Studio versions, you need to use DebugView and modify devenv.exe.config
(see Colin Smith's answer: https://stackoverflow.com/a/21759835/1941779). Note that this solution does NOT work for Visual Studio 2015.
这篇关于Visual Studio 项目已过期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Visual Studio 项目已过期
基础教程推荐
- 如何“在 Finder 中显示"或“在资源管理器中显 2021-01-01
- 使用从字符串中提取的参数调用函数 2022-01-01
- 如何使图像调整大小以在 Qt 中缩放? 2021-01-01
- 管理共享内存应该分配多少内存?(助推) 2022-12-07
- Windows Media Foundation 录制音频 2021-01-01
- 从 std::cin 读取密码 2021-01-01
- 为什么语句不能出现在命名空间范围内? 2021-01-01
- 为 C/C++ 中的项目的 makefile 生成依赖项 2022-01-01
- 如何在不破坏 vtbl 的情况下做相当于 memset(this, ...) 的操作? 2022-01-01
- 在 C++ 中循环遍历所有 Lua 全局变量 2021-01-01