Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

/FU (Name Forced #using File)


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at -FU (Name Forced #using File).

A compiler option that you can use as an alternative to passing a file name to #using Directive in source code.

/FU file  

Specifies the metadata file to reference in this compilation.

The /FU switch takes just one file name. To specify multiple files, use /FU with each one.

If you are using C++/CLI and are referencing metadata to use the Friend Assemblies feature, you can't use /FU. You must reference the metadata in code by using #using—together with the [as friend] attribute. Friend assemblies are not supported in Visual C++ component extensions (C++/CX).

For information about how to create an assembly or module for the common language runtime (CLR), see /clr (Common Language Runtime Compilation). For information about how to build in C++/CX, see Building apps and libraries.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.

  2. Select the C/C++ folder.

  3. Select the Advanced property page.

  4. Modify the Force #using property.

To set this compiler option programmatically

Output-File (/F) Options
Compiler Options
Setting Compiler Options

© 2017 Microsoft