diff --git a/Refit/UniqueName.cs b/Refit/UniqueName.cs index 0fc7e85f9..fafb23acc 100644 --- a/Refit/UniqueName.cs +++ b/Refit/UniqueName.cs @@ -39,7 +39,7 @@ public static string ForType(Type refitInterfaceType) interfaceTypeName = interfaceTypeName.Replace("+", ""); // Get the namespace and remove the dots - var ns = refitInterfaceType.Namespace?.Replace(".", ""); + var ns = refitInterfaceType.Namespace?.Replace(".", "").Replace("-", "_"); // Refit types will be generated as private classes within a Generated type in namespace // Refit.Implementation