Dejulia489 / WindowsServiceManager

https://marketplace.visualstudio.com/items?itemName=MDSolutions.WindowsServiceManagerWindowsServiceManager
MIT License
11 stars 9 forks source link

Deploay causes ##[error]String can't be parsed. The StringContainingPath parameter should contain a valid Path ending with an '.exe' or '.dll'. Current string [XXXXX.exe] #39

Open leonkelder opened 4 years ago

leonkelder commented 4 years ago

Your previous version as described below worked perfectly, albeit with a single version in deploying a TopShelf service. 2020-06-30T10:12:38.4191798Z ============================================================================== 2020-06-30T10:12:38.4192540Z Task : Windows Service Manager 2020-06-30T10:12:38.4193072Z Description : Deploys a Windows Service to an Agent or a Deployment Group Target using WinRM. 2020-06-30T10:12:38.4193467Z Version : 4.3.5 2020-06-30T10:12:38.4193750Z Author : MDSolutions 2020-06-30T10:12:38.4195805Z Help : More Information 2020-06-30T10:12:38.4196583Z ==============================================================================

However, the latest version breaks on the same previously working pipeline with

2020-06-30T17:03:42.3311619Z ============================================================================== 2020-06-30T17:03:42.3312088Z Task : Windows Service Manager 2020-06-30T17:03:42.3312552Z Description : Deploys a Windows Service to an Agent or a Deployment Group Target using WinRM. 2020-06-30T17:03:42.3312943Z Version : 4.4.9 2020-06-30T17:03:42.3313218Z Author : MDSolutions 2020-06-30T17:03:42.3314866Z Help : More Information 2020-06-30T17:03:42.3315612Z ============================================================================== 2020-06-30T17:03:44.0322478Z ##[error]String can't be parsed. The StringContainingPath parameter should contain a valid Path ending with an '.exe' or '.dll'. Current string [C:\Program Files\ZZZZZZZ\YYYYYYYY\XXXXXXXX.exe]

ANy ideas?

leonkelder commented 4 years ago

version

warning

Soerboe commented 4 years ago

We experience the exact same error.

2020-06-30T18:28:43.2354733Z ##[section]Starting: Deploy Windows Service 2020-06-30T18:28:43.2486271Z ============================================================================== 2020-06-30T18:28:43.2486383Z Task : Windows Service Manager 2020-06-30T18:28:43.2486458Z Description : Deploys a Windows Service to an Agent or a Deployment Group Target using WinRM. 2020-06-30T18:28:43.2486514Z Version : 4.4.9 2020-06-30T18:28:43.2486570Z Author : MDSolutions 2020-06-30T18:28:43.2486639Z Help : [More Information](https://github.com/Dejulia489/WindowsServiceManager) 2020-06-30T18:28:43.2486737Z ============================================================================== 2020-06-30T18:28:44.9498565Z [SERVERNAME]: Attempting to locate [SERVICENAME$DEFAULT] 2020-06-30T18:28:46.0064480Z ##[error]String can't be parsed. The StringContainingPath parameter should contain a valid Path ending with an '.exe' or '.dll'. Current string ["C:\Program Files (x86)\XXXService\XXXService.exe" -s SERVERNAME --instancename DEFAULT] 2020-06-30T18:28:46.0378787Z ##[section]Finishing: Deploy Windows Service

DarkChaos commented 4 years ago

It looks like this issue came with a new Feature. @leonkelder You have spaces in your path but no quotes around it. Can you try if quotes around the path fixes the issue in your case?

DarkChaos commented 4 years ago

@Soerboe I found the issue in your case, you have Brackets in your path, which I not considered in the path pattern. I will fix it asap, but it can take one day until I can make the PR.

leonkelder commented 4 years ago

@DarkChaos, thanks very much. The " around the path has indeed fixed the issue.

It looks like this issue came with a new Feature. @leonkelder You have spaces in your path but no quotes around it. Can you try if quotes around the path fixes the issue in your case?

@DarkChaos, thanks very much. The "" around the path has indeed fixed the issue.

Dejulia489 commented 4 years ago

Published release v2.0.65 to resolve this issue.

Dejulia489 commented 4 years ago

I have validated a deployment with quotes in the path.

Thank you everyone for bringing this to light so quickly and thank you @DarkChaos for publishing a fix so fast.

Closing this ticket, I will reopen if the issue persists.

Soerboe commented 4 years ago

This fixed the issue. Thank you for a quick response and fix!

Dejulia489 commented 4 years ago

Feature set has been rolled back. I will be working on it this week and roll it out under V5.

jabteles commented 4 years ago

Issue (https://github.com/Dejulia489/WindowsServiceManager/issues/40) with "%programfiles%\enterprise$(Service.Name)\ServiceName.exe" still occurs.

jabteles commented 4 years ago

Hi @Dejulia489 this issue still occurs as mentioned above, should I create a new Issue?

leonkelder commented 4 years ago

Hi there,

Since this morning we are again receiving the following 2020-08-20T09:58:31.4735439Z ##[debug]Exception: 2020-08-20T09:58:31.4737455Z ##[debug]Microsoft.PowerShell.Commands.WriteErrorException: String can't be parsed. The StringContainingPath parameter should contain a valid Path ending with an '.exe' or '.dll'. Current string [C:\Program Files\Varibill\BillingServer_VaribillQA\Varibill.BillingServer.exe]

The version of the component is 4.4.11, and the last release last night targeted the same version, and had no issue.

Any ideas?