mmajcica / DeploySsrs

Build-Release task for VSTS/TFS that manages Microsoft's SQL Server Reporting Services
MIT License
21 stars 21 forks source link

The 'class' keyword is not supported in this version of the language. #30

Closed batespe closed 5 years ago

batespe commented 5 years ago

When I try and use this tool I get the error below:-

2019-05-10T11:17:37.1366854Z ##[section]Starting: Deploy reports 2019-05-10T11:17:37.1572959Z ============================================================================== 2019-05-10T11:17:37.1573131Z Task : Deploy MS SQL SSRS Reports 2019-05-10T11:17:37.1573274Z Description : Deploy items on MS SQL SSRS server based on a configuration file. 2019-05-10T11:17:37.1573385Z Version : 3.1.4 2019-05-10T11:17:37.1573479Z Author : Mario Majcica 2019-05-10T11:17:37.1573590Z Help : 2019-05-10T11:17:37.1573692Z ============================================================================== 2019-05-10T11:17:38.6149542Z ##[error]At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1135 char:1

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1165 char:13

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1165 char:18

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1176 char:1

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1201 char:1

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1226 char:1

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1268 char:1

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1279 char:14

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1279 char:23

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1282 char:1

Not all parse errors were reported. Correct the reported errors and try again.

batespe commented 5 years ago

I just figured this out. My build server is Windows 2012 Server and have downloaded update for powershell - https://www.microsoft.com/en-us/download/details.aspx?id=54616

Now everything is working well.

RobinCpl commented 2 years ago

Is it possible to specify the path to pwsh.exe for the DeploySSRS extension? For some reasons, the default PoweShell version on the server is 4.0. There is also v7.2 but the extension obviously does not see it.