If I need to provide a DLL by using C++ or C# to somebody. How do I know if my code is managed or unmanaged code? If I use VC++6.0, that means unmanaged and if I use .Net Visual Studio 2005 or later it will be managed code?
+1
A:
C++ code will be unmanaged by default. You have to specifically enable /CLR for it to be mixed mode. It will never be pure managed.
Joshua
2010-06-15 19:27:20
VC++6 cannot produce managed code so don't get any bright ideas.
Joshua
2010-06-15 19:27:46
+1
A:
You can make unmanaged code with any version of Visual Studio.
There is a settings in your project properties under:
Configuration Properties -> General -> Common Language Runtime Support.
If you want unmanaged code then you should set this value to: No Common Language Runtime support
Brian R. Bondy
2010-06-15 19:27:28
what's the key word or indicator to flag managed code and unmanaged code. or it is the setting of the Visual Studio project?
5YrsLaterDBA
2010-06-15 19:31:11
@5YrsLaterDBA: You can read more about C++ CLI and what it can do here: http://en.wikipedia.org/wiki/C%2B%2B/CLI
Brian R. Bondy
2010-06-15 19:32:05
+1
A:
An assembly (or DLL) is "managed" if it is built on the Common Language Run-time (CLR) which is the core of the .NET framework. This is pretty much independent of what version of Visual Studio you use, though older versions can't target the .NET framework at all.
Jim Lamb
2010-06-15 19:29:45