We recommend using Visual Studio 2017

Compiler Error C3381


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