Imports metadata into a program that will use the Managed Extensions for C++.
#using file
where:
file can be an MSIL file that you import for its managed data and managed constructs. If a .dll contains an assembly manifest, then all the .dlls referenced in the manifest are imported and the assembly you are building will list file in the metadata as an assembly reference.
If file does not contain an assembly, then you will also need to pass the file name to the /ASSEMBLYMODULE linker option.
Note that when importing metadata built from source that used __declspec(thread), that the thread semantics are not persisted in metadata. For example, a variable declared with __declspec(thread), compiled in a program that is build for the NGWS runtime, and then imported via #using, will no longer have __declspec(thread) semantics on the variable.
If file has metadata only and not an assembly manifest, the following guidelines discuss how to access the metadata:
using namespace
file to load all classes in the namespace.#using <mscorlib.dll>