2

I converted one of the .net 2.0 (VS2005) solution to work with VS2010 (didn't change the framework). Now when I try to build I keep getting this error message:

'Warning as Error 2008 is not a valid warning number'.

Does anyone know how I can fix this?

bfavaretto
  • 71,580
  • 16
  • 111
  • 150
sanjeev40084
  • 9,227
  • 18
  • 67
  • 99
  • I get the same warning after transfering a solution from `Visual C# Express 2010` on Windows 7 Pro 64bit to `Visual C# Express 2010` on Windows 7 Pro 32bit. Same IDE, same OS, just 64bit/32bit difference... – Nicolas Raoul Nov 19 '12 at 05:06

1 Answers1

2

Are there any @pragma warnings in the project? Do you get a line number with your error?

EDIT:

Try unchecking treat warnings as errors in your project config. That should allow you to compile.

gcochard
  • 11,408
  • 1
  • 26
  • 41
  • did quick search on keyword @pragma on entire solution and i didn't find anything. I see the error message but the line column is empty. – sanjeev40084 Aug 08 '12 at 17:56
  • 1
    check my edit, looks like this is a bug in VS. Look here for more info: https://connect.microsoft.com/VisualStudio/feedback/details/694800/error-cs1691-warning-as-error-2008-is-not-a-valid-warning-number – gcochard Aug 08 '12 at 18:03
  • Greg, you are having that problem after you installed VS2011. I never installed VS2011 in my comp. – sanjeev40084 Aug 08 '12 at 18:10
  • 1
    Here's another SO answer to that question: http://stackoverflow.com/a/2520873/1355166 – gcochard Aug 08 '12 at 18:12
  • I have the same error after downloading and installing VS 2010 express and the now-unsupported XNA 4.0 framework. The install was fresh on a brand-new computer with nothing on it (just got it). I have the same error, so it's not something caused by messing stuff up yourself. –  Jun 04 '14 at 23:29