views:

382

answers:

3

This is probably a no brainer but...

I've just opened a solution in VS2008 and for some reason the compiler doesn't recognised previously compiled errors.

I hit build and I get 100s of errors :

Name 'IIf' is not declared.
Name 'IsNumeric' is not declared.
Name HttpUtility is not declared

etc..

Think this must be something to do with VS2008 going wrong as it builds on my colleagues machine and some of the files have not changed since in source control. The Imports were not in the previous version.

How can I make this build without adding the imports in manually?

+2  A: 

Check your references. Sometimes they seem to break if you have been messing around at all.

nportelli
Yes! There was a missing ref inserted by colleague. Hidden in all those errors. Thanks.
John Nolan
A: 

Those appear to be in the VisualBasic namespace.

Right Click on Project Choose Properties-->References Try adding the import Microsoft.VisualBasic.

Brian Schmitt
+1  A: 

It's almost certainly references.

Visual Studio is fussy about those and can lose references if you move a solution to another location.

Unless your solution is huge (like mine sadly) you can easily fix this by supplying a reference path in each project's properties.

Ed Guiness