none
What's the difference between CLR console application and win32 console application? RRS feed

  • Question

  • visual studio 2010

    What's the difference between CLR console application and win32 console application? 

    and I cannot using namespace System under the win32 console application model.  What should I do when I want to use the namespace?

    and Doesn't it have input hint such as in C# model?

    I can read both Enlgish and Chinese

    Thank you very much


    Yi
    Friday, February 25, 2011 1:53 AM

Answers

  • On 2/24/2011 8:53 PM, Yijie.Li wrote:

    visual studio 2010

    What's the difference between CLR console application and win32 console application?

    The former uses Common Language Runtime (in other words, .NET framework); the latter does not.

    and I cannot using namespace System under the win32 console application model.

    System namespace is part of .NET framework.

    What should I do when I want to use the namespace?

    You should write a .NET application.

    and Doesn't it have input hint such as in C# model?

    There is indeed no IntelliSense for C++/CLI in the existing versions of Visual Studio. If you want a .NET application, C# might be a better language choice.


    Igor Tandetnik

    • Marked as answer by Yijie.Li Friday, February 25, 2011 4:11 AM
    Friday, February 25, 2011 2:05 AM
  • The Win32 console project template will let you create a native console application. You cannot use the .NET framework from this project (unless you change the project settings).

    The CLR console project creates a console project with .NET compilation settings turned on (mainly /clr). You can now write both native and managed code in these projects. If you need .NET access, then this would be the one to choose.


    http://blog.voidnish.com
    • Marked as answer by Yijie.Li Friday, February 25, 2011 4:11 AM
    Friday, February 25, 2011 2:04 AM
    Moderator

All replies

  • The Win32 console project template will let you create a native console application. You cannot use the .NET framework from this project (unless you change the project settings).

    The CLR console project creates a console project with .NET compilation settings turned on (mainly /clr). You can now write both native and managed code in these projects. If you need .NET access, then this would be the one to choose.


    http://blog.voidnish.com
    • Marked as answer by Yijie.Li Friday, February 25, 2011 4:11 AM
    Friday, February 25, 2011 2:04 AM
    Moderator
  • On 2/24/2011 8:53 PM, Yijie.Li wrote:

    visual studio 2010

    What's the difference between CLR console application and win32 console application?

    The former uses Common Language Runtime (in other words, .NET framework); the latter does not.

    and I cannot using namespace System under the win32 console application model.

    System namespace is part of .NET framework.

    What should I do when I want to use the namespace?

    You should write a .NET application.

    and Doesn't it have input hint such as in C# model?

    There is indeed no IntelliSense for C++/CLI in the existing versions of Visual Studio. If you want a .NET application, C# might be a better language choice.


    Igor Tandetnik

    • Marked as answer by Yijie.Li Friday, February 25, 2011 4:11 AM
    Friday, February 25, 2011 2:05 AM
  • Thanks Igor Tandetnik
    Avatar of Igor Tandetnik

    Igor Tandetnik

    MCC, MVP

    . Perfect answer.
    • Edited by blastoSO Tuesday, February 4, 2014 10:52 PM
    Tuesday, February 4, 2014 10:52 PM
  • There is indeed no IntelliSense for C++/CLI in the existing versions of Visual Studio.

    Say what? That's true for VS2010 (which the OP is using), but AFAIK it was reinstated in
    subsequent versions.

    C++/CLI IntelliSense in Visual Studio vNext
    3 Mar 2011 3:26 PM
    http://blogs.msdn.com/b/vcblog/archive/2011/03/03/10136696.aspx

    "Why We Didn’t Include C++/CLI IntelliSense in Visual Studio 2010"
    ...
    "The good news is that C++/CLI IntelliSense will be in the next version of Visual Studio." (2012)

    What's New for Visual C++ in Visual Studio 2012
    http://msdn.microsoft.com/en-us/library/vstudio/hh409293%28v=vs.110%29.aspx

    "C++/CLI IntelliSense. C++/CLI now has full IntelliSense support. IntelliSense features such
    as Quick Info, Parameter Help, List Members, and Auto Completion now work for C++/CLI. In
    addition, the other IntelliSense and IDE enhancements listed in this document also work for
    C++/CLI."

    - Wayne

    Wednesday, February 5, 2014 12:44 AM
  • On 2/4/2014 7:44 PM, WayneAKing wrote:

    There is indeed no IntelliSense for C++/CLI in the existing versions of Visual Studio.

    Say what? That's true for VS*2010* (which the OP is using), but AFAIK it was reinstated in
    subsequent versions.

    That post of mine you are quoting is dated February 2011. Why blastoSO chose to resurrect the thread in February 2014, I have no idea.


    Igor Tandetnik


    Igor Tandetnik
    Wednesday, February 5, 2014 12:54 AM
  • That post of mine you are quoting is dated February 2011. Why blastoSO chose to resurrect the thread in February 2014, I have no idea.

    <chuckle> So it is - I'm usually sensitive to such resurrections, but in this case failed to
    observe that the latest poster was an antiquarian. I suppose blastoSO feels it's never too
    late to say "thanks".

    - Wayne

    Wednesday, February 5, 2014 3:16 AM