Squiggly red lines under standard classes like CString in latest update to VS2022
Since an update was done on VS2022 it no longer recognise its own classes as well as my own functions. Note all the things underlined in squiggly red below:
What do I need to do to get it to work as before?.
Windows API - Win32
-
RLWA32 40,651 Reputation points
2022-06-30T13:01:18.703+00:00 Have you tried rescanning the solution?
-
Junjie Zhu - MSFT 15,056 Reputation points • Microsoft Vendor
2022-07-01T04:43:17.223+00:00 Any hints for the red line? Using CString see this document [Using CString] https://learn.microsoft.com/en-us/cpp/atl-mfc-shared/using-cstring?view=msvc-170
-
Owen Ransen 541 Reputation points
2022-07-01T15:53:02.63+00:00 Do you mean a clean and rebuild?
-
Owen Ransen 541 Reputation points
2022-07-01T15:54:08.057+00:00 CString is a standard MFC string implementation which I have been using for years, And suddenly many standard Windows MFC functions are flagged as "undefined" even if the compiler compiles them perfectly...
-
RLWA32 40,651 Reputation points
2022-07-01T16:09:18.537+00:00 Select the project in Solution Explorer. Then from the context menu click on Rescan Solution. Or from the Main Menu click on Project | Rescan Soluction.
If that doesn't help then close the solution and navigate to the .vs hidden folder that should be in the solution folder. Delete everything under .vs except for the .suo file in a sub-folder. Then re-open the solution and give VS time to rebuild everything (background tasks).
-
Junjie Zhu - MSFT 15,056 Reputation points • Microsoft Vendor
2022-07-04T02:21:59.51+00:00 Hi, Owen
I tried it locally and it works fine.
I recommend openingvisual studio installer
to reinstallC++ MFC
related components. -
Owen Ransen 541 Reputation points
2022-07-05T05:48:32.87+00:00 Thanks I'll do that, though why I should after a recent install I have no idea.
-
Owen Ransen 541 Reputation points
2022-07-05T09:57:52.277+00:00 Fixed. Red lines magically gone away. I did nothing. Enigma inside mystery.
-
RLWA32 40,651 Reputation points
2022-07-05T10:00:19.06+00:00 Most likely intellisense finally updated itself for your project. That's the reason my very first suggestion was for you to rescan the solution.
-
Owen Ransen 541 Reputation points
2022-07-05T15:00:41.147+00:00 I still don't know what you mean by "rescan the solution"...
-
RLWA32 40,651 Reputation points
2022-07-05T15:05:12.767+00:00 You didn't understand my earlier comment where I provided specific instructions on how to accomplish this?
-
Owen Ransen 541 Reputation points
2022-07-06T03:21:48.823+00:00 Arg! I missed your explanation. Goddit now, thanks!
Sign in to comment