From 7bb7ac9a659387a8db3b205445fcd5503aa442ce Mon Sep 17 00:00:00 2001 From: Morgana Date: Wed, 1 Apr 2026 19:38:54 +0000 Subject: [PATCH] fix(build): add CultureInfo.InvariantCulture to int.Parse in SmtpEmailService CA1305 becomes an error in Release mode because Directory.Build.props sets TreatWarningsAsErrors=true for non-test projects in Release. The Docker build on Render uses -c Release, so this caused the deploy to fail. --- src/ClientManager.Infrastructure/Services/SmtpEmailService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ClientManager.Infrastructure/Services/SmtpEmailService.cs b/src/ClientManager.Infrastructure/Services/SmtpEmailService.cs index 1abcf50..3b839d4 100644 --- a/src/ClientManager.Infrastructure/Services/SmtpEmailService.cs +++ b/src/ClientManager.Infrastructure/Services/SmtpEmailService.cs @@ -61,7 +61,7 @@ public async Task SendWelcomeEmailAsync(string email, string name, byte[]? attac public async Task SendWelcomeEmailToUserAsync(string email, string username) { var host = configuration["Smtp:Host"]; - var port = int.Parse(configuration["Smtp:Port"] ?? "587"); + var port = int.Parse(configuration["Smtp:Port"] ?? "587", CultureInfo.InvariantCulture); var username2 = configuration["Smtp:Username"]; var password = configuration["Smtp:Password"]; var fromEmail = configuration["Smtp:FromEmail"] ?? "no-reply@clientmanager.com";