One of the most dangerous Visual Studio behaviors is building and running with a different configuration than you think.
You debug Debug, but the app actually runs Release — or worse, a cached build.
Why this happens
-
Multiple startup profiles
-
IIS Express vs Kestrel mismatch
-
Configuration Manager not synced across projects
Life-saving fix
-
Open Configuration Manager
-
Ensure every project uses the same configuration
-
Disable “Use global.json” if SDK mismatch exists
-
Clear
.vs,bin, andobjonce after fixing
This prevents ghost bugs that only appear “on some machines”.
