views:

83

answers:

2

To be a bit more clear. If I have a Visual Studio C++ solution that has two projects, say a static library with CLR support turned off, and a second project with CLR support turned on that depends on this static library, does the static library get compiled as managed code? What about libraries that the CLR project uses that are external to this solution, do they also get compiled as managed code?

+1  A: 

No, only the project with /clr gets compiled to a managed assembly. The static library will get compiled as unmanaged code and linked into the managed DLL.

Igor Zevaka
A: 

No, your dependencies do not get compiled as managed code.

Your "main" project actually ends up containing both managed and unmanaged code. Those parts when you call your dependency would be compiled as unmanaged.

Fyodor Soikin