Search code examples
.netreferencenamespacescompiler-errorsopennetcf

Why would I get "The type of namespace name 'bla' does not exist..." after no changes?


Why would I go from building with no errors to 3 of the type:

The type of namespace name 'bla' does not exist in the class or namespace 'blah' (are you missing an assembly reference?)

All three errors refer to the same group of files (two errors in "OpenNETCF" and one in "OpenNETCF.Win32"); How could it be that these types did exist in the class earlier in the day, and now they don't? I didn't remove or update those references...

UPDATE

When I went to compile this (the next) morning in the VM (XP Mode), I got:

Automatic Updates
Updating your computer is almost complete. Your computer needs to be restarted for the updates to take effect. Windows will restart your computer automatically in .... minutes.

I got this yesterday, too, and didn't think much of it - just clicked the Restart Now button.

After restarting and building, I get 0 errors again, so it was apparently not a problem with the code itself.

I don't know if this is pertinent, but I also got today (both times the XP Mode VM started up):

Devices or applications disabled
'Virtual PC/Windows CE Emulator' will cause Windows to become unstable. Windows has prevented these drivers from loading. Click here for more details.

...which took me to: http://support.microsoft.com/default.aspx?scid=kb;en-us;891667


Solution

  • It's simply a matter of restarting, and letting Visual Studio get its breath back.