views:

291

answers:

0

I'm trying to compile a managed cpp application from the command line. Suppose my cpp application references the .NET 2.5 framework's "System.dll". I can compile like this, without problems:

cl /clr /FU"System.dll" main.cpp

The application then works as expected. If, however, I try to reference the .NET 3.5 framework's "System.core.dll" using the following command line:

cl /clr /FU"System.core.dll" main.cpp

I see the following error:

main.cpp : fatal error C1107: could not find assembly 'system.core.dll': please specify the assembly search path using /AI or by setting the LIBPATH environment variable

My LIBPATH is set correctly, using C:\Windows\Microsoft.NET\Framework\v2.5\ and C:\Windows\Microsoft.NET\Framework\v3.5. The v2.5 path contains the necessary reference dlls, which explains why the compilation works ok for the "system.dll" case. However, the v3.5 path contains absolutely no reference binaries, which also explains why the compiler can't find them.

My question is this: Why isn't the v3.5 path populated with the framework dlls? The dll's do exist in my "C:\Program Files\Reference Assemblies\" path, but no where else.