Aviso do compilador (nível 1) CS0684

interface "interface" marcada com "CoClassAttribute" não marcada com "ComImportAttribute"

Se você especificar CoClassAttribute em uma interface, também deverá especificar ComImportAttribute.

O seguinte exemplo gera CS0684:

// CS0684.cs  
// compile with: /W:1  
using System;  
using System.Runtime.InteropServices;  
  
[CoClass(typeof(C))] // CS0684  
// try the following line instead  
// [CoClass(typeof(C)), ComImport]  
interface I  
{  
}  
  
class C  
{  
   static void Main() {}  
}