none
Why does VS 2008 .NET 3.5 stop compiling on first module with error? RRS feed

  • Question

  • I've been working with .NET for a long time.  Historically, when I would do a compile, it would give me all compile errors in the entire project.  I can then click through the task list, and correct every error.

    I have  a solution with about a dozen projects, I click 'build solution'.  If there is any class with a code error, it aborts the compile on that class and does not continue compiling.  My first thought is that it was another new Vista Bug, but I've installed VS 2008 on an XP machine, and have the exact same issue there.  I pray there is a setting to have it not abort on first error, but so far, I cannot find it.
    Friday, October 24, 2008 6:13 PM

Answers

  • Hi Brian

    What is your VS2008 edition?
    I just try using VSTS 2008 SP1 to build a two-project (specifically, 2 class library) solution, IDE built the good project while leaving the bad one with failed information.

    In the output window, it writes:

    ------ Build started: Project: ClassLibrary1, Configuration: Debug Any CPU ------
    C:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ClassLibrary1.dll /target:library Class1.cs Properties\AssemblyInfo.cs
    C:\Documents and Settings\v-fifei\My Documents\Visual Studio 2008\Projects\ClassLibrary3\ClassLibrary1\Class1.cs(12,13): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
    C:\Documents and Settings\v-fifei\My Documents\Visual Studio 2008\Projects\ClassLibrary3\ClassLibrary1\Class1.cs(12,13): error CS0103: The name 'non-context_Variable' does not exist in the current context

    Compile complete -- 2 errors, 0 warnings
    ------ Build started: Project: ClassLibrary3, Configuration: Debug Any CPU ------
    C:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ClassLibrary3.dll /target:library Class1.cs Properties\AssemblyInfo.cs

    Compile complete -- 0 errors, 0 warnings
    ClassLibrary3 -> C:\Documents and Settings\v-fifei\My Documents\Visual Studio 2008\Projects\ClassLibrary3\ClassLibrary3\bin\Debug\ClassLibrary3.dll
    ========== Build: 1 succeeded or up-to-date, 1 failed, 0 skipped ==========

    Thanks.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. http://forums.msdn.microsoft.com/en-US/vssetup/thread/60424309-bd78-4ca2-b618-03c4a16123b6
    • Edited by Figo Fei Monday, October 27, 2008 9:26 AM typo
    • Marked as answer by Figo Fei Thursday, October 30, 2008 5:36 AM
    Monday, October 27, 2008 9:25 AM

All replies

  • Hi Brian

    What is your VS2008 edition?
    I just try using VSTS 2008 SP1 to build a two-project (specifically, 2 class library) solution, IDE built the good project while leaving the bad one with failed information.

    In the output window, it writes:

    ------ Build started: Project: ClassLibrary1, Configuration: Debug Any CPU ------
    C:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ClassLibrary1.dll /target:library Class1.cs Properties\AssemblyInfo.cs
    C:\Documents and Settings\v-fifei\My Documents\Visual Studio 2008\Projects\ClassLibrary3\ClassLibrary1\Class1.cs(12,13): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
    C:\Documents and Settings\v-fifei\My Documents\Visual Studio 2008\Projects\ClassLibrary3\ClassLibrary1\Class1.cs(12,13): error CS0103: The name 'non-context_Variable' does not exist in the current context

    Compile complete -- 2 errors, 0 warnings
    ------ Build started: Project: ClassLibrary3, Configuration: Debug Any CPU ------
    C:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ClassLibrary3.dll /target:library Class1.cs Properties\AssemblyInfo.cs

    Compile complete -- 0 errors, 0 warnings
    ClassLibrary3 -> C:\Documents and Settings\v-fifei\My Documents\Visual Studio 2008\Projects\ClassLibrary3\ClassLibrary3\bin\Debug\ClassLibrary3.dll
    ========== Build: 1 succeeded or up-to-date, 1 failed, 0 skipped ==========

    Thanks.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. http://forums.msdn.microsoft.com/en-US/vssetup/thread/60424309-bd78-4ca2-b618-03c4a16123b6
    • Edited by Figo Fei Monday, October 27, 2008 9:26 AM typo
    • Marked as answer by Figo Fei Thursday, October 30, 2008 5:36 AM
    Monday, October 27, 2008 9:25 AM
  • I am running Visual Studio Team System 2008.  V 9.0.21022.8 RTM

    I have a solution with 12 projects, and not only will it not finish building a whole projct, but for a given project with say 10 classes, it will only build the one class, then stop compiling if an error exists in that class, it won't even go to the next class in the project.  Normally my development cycle is to work on code for several hours and only do compiles when I am ready.  With a solution this large, even a clean compile takes about 15 minutes, so I don't tend to do them often.  But because of the way it keeps stopping, it sometimes takes me 2 hours to get through a compile if I have a number of issues.  This is really causing a lot of extra work.  If it wasn't too late, I would seriously consider reverting back to VS 2005 at this point, but I can't now.
    • Edited by Brian Kitt Thursday, October 30, 2008 4:13 PM
    Thursday, October 30, 2008 4:12 PM