Export (0) Print
Expand All

Referencing Additional Components from a Managed Application

Visual Studio .NET 2003

At various times, a managed application will need to reference other managed components. The TilePuzzle sample demonstrates this concept by referencing two other managed projects in the same solution. TilePuzzle adds these references to additional managed projects (using the following procedure) from the TileDriver project.

To add additional managed components to a managed solution

  1. Load your managed solution into Visual Studio.
  2. In Solution Explorer, right-click the project node that needs to reference additional components.
  3. On the shortcut menu, click Properties.

    The Property Pages dialog box appears.

  4. In the left pane, click the C/C++ folder.
  5. Click the General folder under C/C++.
  6. In the Resolve #using References edit box, add all paths to any managed DLLs you reference from your managed project.
  7. Click OK.
Note   Once you make these changes to the project, there is no need to specify the absolute path for any #using statements in your project.

In addition to this procedure, you can also construct a pre-build event that copies any referenced DLLs to the same directory containing the .exe file of your Managed Extensions for C++ application. For more information, see Specifying Build Events.

See Also

Interoperability in Managed Extensions for C++ | TilePuzzle sample | Introduction to the .NET Framework Class Library

Show:
© 2014 Microsoft