Compiler Error C3381

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C3381.

assembly' : assembly access specifiers are only available in code compiled with a /clr option

Native types can be visible outside the assembly, but you can only specify assembly access for native types in a /clr compilation.

For more information, see Type visibility and /clr (Common Language Runtime Compilation).

The following sample generates C3381.

// C3381.cpp  
// compile with: /c  
public class A {};   // C3381  

Show: