@@ -463,23 +463,23 @@ def prepare_and_start_backend(
463463 else :
464464 # Verify dotnet is installed
465465 import shutil
466-
467- if version < 261 : # Only execute this block if version is less than 261
466+ if not any (
467+ CORE_GEOMETRY_SERVICE_EXE .replace (".exe" , "" ) in file .name
468+ for file in Path (root_service_folder ).iterdir ()
469+ ):
468470 if not shutil .which ("dotnet" ):
469471 raise RuntimeError (
470472 "Cannot find 'dotnet' command. "
471473 "Please install 'dotnet' to use the Ansys Geometry Core Service. "
472474 "At least dotnet 8.0 is required."
473475 )
474-
475476 # At least dotnet 8.0 is required
476477 # private method and controlled input by library - excluding bandit check.
477478 if subprocess .check_output (["dotnet" , "--version" ]).decode ("utf-8" ).split ("." )[0 ] < "8" : # nosec B607, B603
478479 raise RuntimeError (
479480 "Ansys Geometry Core Service requires at least dotnet 8.0. "
480481 "Please install a compatible version."
481482 )
482-
483483 # For Linux, we need to use the dotnet command to launch the Core Geometry Service
484484 args .append ("dotnet" )
485485 args .append (
@@ -488,7 +488,10 @@ def prepare_and_start_backend(
488488 CORE_GEOMETRY_SERVICE_EXE .replace (".exe" , ".dll" ),
489489 )
490490 )
491- if version >= 261 :
491+ if any (
492+ CORE_GEOMETRY_SERVICE_EXE .replace (".exe" , "" ) in file .name
493+ for file in Path (root_service_folder ).iterdir ()
494+ ):
492495 # For Linux, we need to use the exe file to launch the Core Geometry Service
493496 args .append (
494497 Path (
0 commit comments