Windows and Linux projects in the same solution - Intellisense getting silly.

Visual Studio 22

Perhaps somebody can point me at the Intellisense 'start over' button but when I switch from the Windows console version of the code to the Raspberry Pi version in the same solution and back Intellisense will not forget some of the code details. eg: I modified a function to return a bool rather than a void as it needed to communicate an active state back to the caller as it grew an extra bit of functionality and the code compiled and ran but Intellisense clung to the old version with lots of red squiggles. Exit and restart didn't help. This is talking about a file that is included in both parts to ensure the user think doesn't have to change on where they use the code. Closing all the files that were opened in one project and reopening exactly the same file via the other project (in a common folder) helps other problems but not ol' Intellisense.

Actually VS2022 is handling the development of the two OS version brilliantly with the common files in both projects and wifi-ing into the Pi to compile with GCC and run the tests. It's just Intellisense that it letting the side down. Well that and having to manually swap between x64 and ARM modes as I change the startup project. It would be nice if it could remember that one for me.

Posted Jan 30, 2022, 10:39 PM UTC

02
polaarbear•

Isn't there an option to build for "Any CPU" that outputs all the different versions into their respective bin folders so you don't have to toggle back and forth? (bin/x86, bin/x64, bin/arm)

And if you are using .NET Core/5/6, why does it require maintaining two different projects? The way I understand it they should essentially be functionally identical under the hood. The only way I can see Intellisense getting confused is if you are re-using identical method definitions within the same namespace.

1
nigelhOP•

That nope and nope. No 'Any CPU' and not .NET

1