Latest svn build errors

Aug 10, 2009 at 7:02 PM

I just did an "svn up" and "msbuild" at the command line under a VS 2008 command prompt and got a series of compilation errors, the first of which is:

HttpModules\FileModule.cs(19,69): error CS1031: Type expected

For this line of code:

private static readonly string[] DefaultForbiddenChars = new[]{ "\\", "..", ":" };

I fixed by adding " string" before "[]" to make " string[]...". Then the build gets past that file, but encounters the same type of error at HttpRequest.cs(18,57) with the same type of fix.

So is this working for anyone else? What version of C# or .NET are you guys using?


Aug 11, 2009 at 12:15 AM

I tried building in VS2008 and it works fine. I have no idea why "msbuild" from a VS2008 command prompt fails. It's as if it's invoking the C# compiler from VS2005, but I double checked and I'm definitely using the correct command prompt.

Anyone have any ideas?


Aug 11, 2009 at 12:38 AM

Well at least this works:

devenv HttpServer.sln /Build

So much for msbuild...


Aug 11, 2009 at 6:40 AM

That C# 3.0 syntax. I've revert back to the old syntax. 

Aug 11, 2009 at 8:25 AM

The C# 3 syntax works fine in both VS2008 and running it from the command line. Only msbuild gets confused.

Also syntactic niceties like that do not preclude targeting the .NET 2.0 run-time if that's what you wanted to do. The syntax is a compile-time phenomena.

Please don't revert on my behalf. I'm down for "var x = ..." and the like.