Hi Simon- thanks for the response (quick as usual!). Any additional files that I use are either 1) Arduino/Teensy library files that reside in the Arduino "libraries" folder and are #included at the top of my .ino file or 2) cpp/h files that I create or move to the project folder itself (often my code is published in conjunction with my Circuit Cellar magazine column, and it's easier for the reader if I keep all the library/source files together in one project folder). When I have to clean out the .sln, etc files and Release etc. folders as mentioned in post #1, VS/VM will automatically find all of those files and they will re-appear in the Solution Explorer folder hierarchy, exactly the same as before I erased all but the project's ino file. So, yes, all of the files are visible in the Solution Explorer. Although I do sometimes add/modify code in the associated cpp/h library files, I am generally generating/editing code in the main .ino file, and that is the only time this problem crops up (as well as I can remember). I use classes when accessing Arduino libraries. While I've written some of my own functions as a class, I have not written/edited/used any of my own classes lately i.e. since this problem has become so frequenct. Also, prior to seeing the CLASS NOT REGISTERED error, sometimes when I click on a function in Sol'n Explorer, it will bring me to a spot in the code which is 10-50 lines of code UP from the actual function itself. There might be a correlation between how many lines of code I have added in my recent editing session, and this offset, but that's hard to know for sure, of course. When this happens, I can be pretty sure that the CLASS NOT REGISTERED error will occur later in my coding session. MY "style" is to write new functions, as needed, and place them at the end of the ino file. I then work on expanding the code in Setup/Loop from there. When this error occurs, it always involves functions that are further on in the program than where I am currently generating new code. Beyond the fact that the compiler and Intellisense don't flag any errors, I'm not seeing anything odd when perusing the listing. But, I must be hitting some weird combination of keys to be causing this situation. I'm not sure the depth of the "undo" function, but I might have to try "un-rolling" my work, line by line, to see if I can figure out when the error disappears if indeed it ever does). Many thanks
|