0

The real projects are part of a larger legacy solution but the basic structure is (appears to be?) as follows:

Project A (C++)
Project B (C++) (depends on Project A)
Project C (C++, involves CUDA code) (depends on Project A and Project B)

When building project C from a completely clean state, builds for A, B, and C are triggered as expect and succeed. Selecting build for C again, detects that A and B are up-to-date but triggers a build for C again:

...
Done building project "C.vcxproj"
...
========== Build: 1 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========

This never resolves and project C appears to always be "not up-to-date".

Historically this behavior seemed to have started after switching the projects from Visual Studio 2015 to Visual Studio 2019.

What I Tried So Far

There seem to be no obvious errors in the project files (missing files etc.).

File path case-sensitivity does not seem to be issue (apparently the compilation process always converts everything to lower case, hence the "build input 'c.vcxproj' is missing").

I have tried both the Visual Studio internal "Diagnostic" build option as well as enabling "CPS" output (modified version(s) of Enable C++ and Javascript project system tracing) but so far without success.

Diagnostic build provided the following output as to Why? (it thinks) it needs to build project C:

------ Up-To-Date check: Project: C.vcxproj, Configuration: Debug x64 ------
Project is not up-to-date: build input 'c.vcxproj' is missing.

And the CPS log does not add any additional information there

CPS Verbose: 2376 : ------ Up-To-Date check: Project: C.vcxproj, Configuration: Debug x64 ------
CPS Verbose: 2376 : Project is not up-to-date: build input 'c.vcxproj' is missing.
CPS Verbose: 2376 : Resolving service 'EnvDTE.DTE' through the service provider System.__ComObject.
CPS Verbose: 2376 : Resolving service 'Microsoft.VisualStudio.Shell.Interop.IVsSolution' through the service provider System.__ComObject.

I also tried disabling multi-processor use without change to the behavior.

Updates/Additional attempts to get more information:

  • Sysinternals Process Monitor does not show failures to access or find the "some path"\C.vcxproj file. Both the 'devenv.exe' and 'MSBuild.exe' processes show only successful attempts to access / find the file when monitoring via Process Monitor during Visual Studio build.

Question

In particular I am slightly confused by the reference that the project file 'c.vcxproj' is needed as "build input" or how it could be missing - since it is clearly trying to execute the build defined in the project file.

Has anyone come across this particular instance of a "can't find the file that I am actively processing" error with Visual Studio?

Or can maybe be offer suggestions for additional tools to track this down?

Thank you for taking the time to read this entry - much appreciated.

taq2tds
  • 1
  • 2
  • From the similar [thread](https://stackoverflow.com/questions/6054066/visual-studio-project-is-not-up-to-date-because-alwayscreate-was-specified): make sure to delete all the references to files (like .h files) that do not exist. Does deleting the .vs folder work? – Minxin Yu - MSFT May 11 '23 at 02:15

0 Answers0