I just installed Visual Studio 2017. When I open an existing website, I get all sorts of warning messages such as this one:
IDE1006 Naming rule violat
You could rename the method and add the name to the attribute with the EntryPoint property.
EntryPoint
[System.Runtime.InteropServices.DllImport("swedll32.dll", EntryPoint = "swe_calc")] public static extern Int32 SweCalc(double tjd, int ipl, Int32 iflag, IntPtr xx, IntPtr serr);