" in front of the "" line; and finally restart the vs2010 software."> What should I do if vs2010 prompts that the project has expired?-VSCode-php.cn

What should I do if vs2010 prompts that the project has expired?

藏色散人
Release: 2020-04-27 16:28:37
Original
16304 people have browsed it

What should I do if vs2010 prompts that the project has expired?

What should I do if vs2010 prompts that the project has expired?

Solution that always prompts that this project has expired when starting debugging

Recommended tutorial:vscode tutorial

What should I do if vs2010 prompts that the project has expired?

First of all, if the compilation fails in Visual Studio, then this prompt is normal.

Because this project has expired, it means that you have changed some files or project configurations or did not compile successfully last time. You need to recompile, otherwise debugging will cause errors.

If your last compilation passed and this prompt still appears when you press F5 to debug, there may be a problem.

If this problem occurs every time, then this solution is suitable for you.

Of course the solution is not to select "Don't show this dialog box again". This just doesn't show it, but it will be compiled first before starting each time it is debugged.

What we want is to stop compiling and start debugging directly.

First of all, this prompt means that visual studio found that some files have expired, but no files were found to be compiled during compilation, and even the output files were not regenerated. Doesn't this trick me?

Okay, actually it tricked me, this is a Visual studio bug. This problem generally does not occur on Visual studio 2005, but this problem will occur on Visual studio 2010. It is not clear for other versions.

Although it is a bug, it can be solved.

The reason for this bug is that Visual studio 2010 thinks that the deleted files in the project are expired. For example, a header file in the project has been deleted and Visual studio 2010 cannot find the header file. , it is considered expired, so every time VS is debugged, it thinks the project is expired and needs to be compiled first.

Then why no files were found to be compiled during compilation? The reason is that this header file is not used by any CPP or C file, so no files were found to be recompiled during compilation.

The principle of the bug is understood. The solution is to delete the header file in the VS project.

A stupid way is to click to open each header file in VS and find the one that cannot be opened.

A smart way is to write a script to parse the project file and then verify whether the file exists.

Another way is to view it through DebugView.

The following introduces one such solution.

1. Open the devenv.exe.config file (this file is in %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\ or %ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\ )

2. Add

    
Copy after login

3. Restart Visual Studio

4. Open DbgView (Download address: http:// technet.microsoft.com/en-us/sysinternals/bb896647), check: Menu-》Capture-》Capture Win32 and Menu-》Capture-》Capture Events

5. Click F5 to start debugging, and a prompt will appear Stop when "This project has expired"

6. Press ctrl F in the DbgView window to find "not up to date", and find such as:

[120] Project 'D:\cache\ test1\test1.vcxproj' not up to date because build input 'D:\CACHE\TEST1\FUN1.H' is missing.

7. At this time, the key file FUN1.H is found. As long as the project Just remove this file and compile it again.

The above is the detailed content of What should I do if vs2010 prompts that the project has expired?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!