locked
VS 2008 uses .NET v3.5 compiler although target is v2.0 RRS feed

  • Question

  • Hi!
    I have an application that has v2.0 as .NET Target version. I noticed on Output window that VS uses compiler of .NET v3.5 to build the application. I also noticed that still v2.0 System assemblies are used. Here is part of the command line I see:

    C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe
        /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE
        /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
        /debug+ /debug:full /optimize-
        ... ... ... ... ...

    I come to the following conclusions. Please correct me if I'm wrong:
    1. The output assembly will require v2.0 of framework as prerequisite. v3.5 will not be used.
    2. Although I'm working with v.2.0 as target version, I can still use some of the new v3.5 compiler functionality, such as implicit typed variables (var) or automatic properties.

    Dimitris Papadimitriou, Software Development Professional
    Tuesday, June 17, 2008 12:16 PM

Answers

  • You have come to the correct conclusions on both issues.


    Dependency Visualizer - http://www.codeplex.com/dependencyvisualizer
    • Marked as answer by Feng Chen Wednesday, June 18, 2008 11:36 AM
    Wednesday, June 18, 2008 6:24 AM

All replies

  • You have come to the correct conclusions on both issues.


    Dependency Visualizer - http://www.codeplex.com/dependencyvisualizer
    • Marked as answer by Feng Chen Wednesday, June 18, 2008 11:36 AM
    Wednesday, June 18, 2008 6:24 AM
  • Thanks for your feedback.
    This is unbelievable feature!!! 1000 thumbs up for the C# compiler team!!!

    Dimitris Papadimitriou, Software Development Professional
    Wednesday, June 18, 2008 12:19 PM