0

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

B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862

2 Answers2

2

One thing to check is to see if your project is accidentally set to use the .NET client profile. That cause all kinds of odd 'unknown type' problems.

To check, go to your project properties, then to the Application tab, and check the "Target Framework" setting. If it's set to ".NET Framework 4 Client Profile", try changing it to ".NET Framework 4" and rebuild to see that's what's causing it.

JohnD
  • 14,327
  • 4
  • 40
  • 53
  • Hover over the [opennetcf] tag to find out what it means. – Hans Passant Feb 06 '13 at 02:15
  • @Hans, I haven't used OpenNETCF before, I assume you're saying that the compact framework doesn't use the client profile (and therefore my answer is probably not helpful)? – JohnD Feb 06 '13 at 02:18
  • @JohnD: This is a .NET 1.1 project, running in XP Mode on Windows 7, Visual Studio 2003. I didn't change any configuration on it...I guess this kind of thing was a known issue with VS 2003 and/or .NET 1.1, so maybe tomorrow it will be fine... – B. Clay Shannon-B. Crow Raven Feb 06 '13 at 05:50
  • Right, CF doesn't use profiles. So your answer cannot possibly be correct. – Hans Passant Feb 06 '13 at 09:30
0

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

B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862