Method 'method' cannot be marked with both dllimport and sysnative
The use of the dllimport attribute and sysnative attribute is not allowed on the same method.
The following sample generates CS0608:
public class C1 { [dllimport("kernel32.dll"), sysnative] public static extern int mf (); // CS0608 } public class MainClass { public static void Main () { } }