2

So I got a new PC yesterday and moved my Projects to it by simply copying the Project folders. Now if I open the Projects with Visual Studio 2019 Enterprise like before. Visual Studio shows it can open source files like algorithm, locale and so on. But if I compile the project it works as it should. I am out of ideas at this point. I already checked the SDK versions and so on. They are all correct. I googled for 1 hour now and could not anything or anyone that has the same problem and found a fix.

Edit: All errors are IntelliSense errors

image

Ðаn
  • 10,934
  • 11
  • 59
  • 95
ToKKaN
  • 21
  • 3
  • Are those all intellisense errors? – drescherjm Jan 22 '20 at 21:13
  • yes they are intellisense errors – ToKKaN Jan 22 '20 at 21:13
  • 1
    Have you tried deleting your project's intellisense database file manually? It will force a fresh scan of your project. – François Andrieux Jan 22 '20 at 21:18
  • where do I find the intellisense database for the project? – ToKKaN Jan 22 '20 at 21:20
  • Intelisense is *not* your compiler. It's warnings/errors are not authoritative. Only your *actual* compilers results are. – Jesper Juhl Jan 22 '20 at 21:25
  • This should help: [https://stackoverflow.com/questions/18289936/refreshing-the-auto-complete-intellisense-database-in-visual-studio/24626621](https://stackoverflow.com/questions/18289936/refreshing-the-auto-complete-intellisense-database-in-visual-studio/24626621) – drescherjm Jan 22 '20 at 21:26
  • 2
    I know that IntelliSense isnt my compiler but it is still annoying that everything is underlined red. Deleting the .vs folder and resetting the IntelliSense Database didnt work. – ToKKaN Jan 22 '20 at 21:32
  • 1
    It could be result of lacking a pch header/cpp file, or project lacking configuration of the file. Try creating a new project + solution and check if you have the same errors. – ALX23z Jan 22 '20 at 21:37
  • If a new project is broken in the same way then I think you found a bug in Visual Studio. – drescherjm Jan 22 '20 at 21:40
  • New Projects are not broken. Only the ones I copied. I suspect is has something todo with Visual Studio caching the Intellisense Database somewhere else on the system and not only in the .vs folder – ToKKaN Jan 22 '20 at 21:42
  • 1
    @ToKKaN As far as I know VS doesn't keep a copy of the Intellisense database. This is probably a configuration error. The comment about a precompiled header seems like a promising lead to me. Looks like Intellisense is trying to analyze a PCH that doesn't doesn't exist or exists but is not in use. Try to disable PCHs for your project. – François Andrieux Jan 22 '20 at 21:47
  • I already had precompiled headers turned off. I tried to enable them again same errors and then disabled them again still same errors. – ToKKaN Jan 22 '20 at 21:55
  • If they're *just* Intellisense errors (and *not* problems in the actual compile), then [this answer](https://stackoverflow.com/a/59676398/10871073) may help. – Adrian Mole Jan 22 '20 at 21:57
  • @AdrianMole this removes them from the Output and I did this befor but Intellisense is still underlining everything in the code. – ToKKaN Jan 22 '20 at 22:01
  • I assume you have tried a clean build possibly deleting the Debug / Release folders completely so that everything is totally regenerated. – drescherjm Jan 22 '20 at 22:01
  • Yes I already tried a clean build – ToKKaN Jan 22 '20 at 22:07
  • https://learn.microsoft.com/de-de/archive/blogs/willy-peter_schaub/if-you-have-problems-with-tfs-or-visual-studio-flush-the-user-cache-or-not I also tried this with no working result – ToKKaN Jan 22 '20 at 22:22
  • Please try to delete `.vs` hidden folder under the path of the solution. Besides, if you import any other third party libraries into your project and when you migrate the project into another environment, please do not forget to install the library and reference the path in the new environment. – Mr Qian Jan 23 '20 at 07:37
  • @PerryQian-MSFT, the OP mentioned that this was done. In an answer that explained how to do that. Since it did not work the answer was deleted. – drescherjm Jan 23 '20 at 13:12

0 Answers0