Closed kasperdj closed 4 years ago
Only change was adding this line: "al.ruleSetPath": "./custom.ruleset.json"
Dear @kasperdj ,
Could you try removing the last comma (,) after the last parameter in the json ?
2020-04-07T14:00:16.4208406Z "git.suggestSmartCommit": false,
Kind regards,
Yep, that should be it!
I tried to remove the "al.ruleSetPath": "./custom.ruleset.json" but I still get the error.
HI Kasper, most probably, it's caused by this comma:
Nice catch on that last comma, Didn't get an error in VS Code. Anyways the build is now successful again (with coderule). Thx.
This parsing of setting.json with invalid json is back again (after 3 months without problems). Last time was due to double bytes in the file UTF-16. This is not the case now - and this causes the compile step to fail.
Log output:
2020-04-07T13:59:58.3664803Z ##[section]Starting: ALOps Compile App settings.zip
2020-04-07T13:59:58.3783903Z ============================================================================== 2020-04-07T13:59:58.3784276Z Task : ALOps App Compiler 2020-04-07T13:59:58.3784827Z Description : Compiles NAV Apps 2020-04-07T13:59:58.3785187Z Version : 1.428.1196 2020-04-07T13:59:58.3785437Z Author : Hodor 2020-04-07T13:59:58.3785750Z Help : Compile a Business Central extension from AL code. 2020-04-07T13:59:58.3786141Z ============================================================================== 2020-04-07T14:00:00.8412500Z Validate configuration 2020-04-07T14:00:01.3747727Z Importing required PS-Functions 2020-04-07T14:00:03.8359492Z Initiate Docker Session 2020-04-07T14:00:04.6766313Z Setting up AL Compiler [4.0.176004] 2020-04-07T14:00:05.1181741Z Downloading AL Compiler [4.0.176004] 2020-04-07T14:00:05.1302542Z Get Extension from Local-Disk...[C:\Run\al-4.0.176004.vsix] 2020-04-07T14:00:05.1311653Z Resolving Path [C:\Run\al-4.0.176004.vsix] 2020-04-07T14:00:05.2444545Z VSIX Path Resolved: [C:\Run\al-4.0.176004.vsix] 2020-04-07T14:00:05.2496730Z Unpacking Extension to folder... 2020-04-07T14:00:15.8720346Z Loading Json Object: [c:\Run\Microsoft.al\al-4.0.176004\extension\package.json] 2020-04-07T14:00:15.8943764Z Using AL Compiler [v4.0.176004] located [C:\Run\Microsoft.al\al-4.0.176004\extension\bin\alc.exe] 2020-04-07T14:00:15.8948351Z 2020-04-07T14:00:15.8962020Z Working folder: C:\Agent_work\10\s 2020-04-07T14:00:15.8970345Z 2020-04-07T14:00:15.8979790Z Copy Working folder to Docker Container: 5db73815e7bf14e036b76242e9f7e38dbb75bc626b57b9861d284db9abc11fda 2020-04-07T14:00:15.8987007Z Docker Working Folder: c:\Run\DevOps\ 2020-04-07T14:00:15.8998894Z Copy from [C:\Agent_work\10\s] to [c:\Run\DevOps] 2020-04-07T14:00:15.9061311Z Source File setup completed 2020-04-07T14:00:16.0526668Z Target Project: \app\app.json 2020-04-07T14:00:16.0532723Z Check for app.json files: c:\Run\DevOps\ 2020-04-07T14:00:16.0687666Z Multiple projects found: 2020-04-07T14:00:16.0748796Z - C:\Run\DevOps\app 2020-04-07T14:00:16.0757761Z - C:\Run\DevOps\Test 2020-04-07T14:00:16.0789038Z Retrieving App-Info [\app\app.json] 2020-04-07T14:00:16.0803767Z Loading Json Object: [c:\Run\DevOps\app\app.json] 2020-04-07T14:00:16.0836177Z App.ID = ea93cca9-d1dc-4098-b18f-3eb34aa9d8a4 2020-04-07T14:00:16.0857333Z App.Name = 365Payroll 2020-04-07T14:00:16.0879803Z App.Publisher = Elbek & Vejrup A/S 2020-04-07T14:00:16.0904917Z App.Version = 1500.1.0.0 2020-04-07T14:00:16.0932775Z App.Platform = 15.0.0.0 2020-04-07T14:00:16.0984547Z App.Application = 2020-04-07T14:00:16.1028933Z 2020-04-07T14:00:16.1427925Z Retaining original [Major] from version (?.0.0.0) 2020-04-07T14:00:16.1480799Z Retaining original [Minor] from version (0.?.0.0) 2020-04-07T14:00:16.1547760Z Retaining original [Build] from version (0.0.?.0) 2020-04-07T14:00:16.1616375Z Setting Managed App Version [c:\Run\DevOps\app\app.json] => 1500.1.0.626 2020-04-07T14:00:16.2753928Z 2020-04-07T14:00:16.2754458Z Working Direcotry: [c:\Run\DevOps] 2020-04-07T14:00:16.2754756Z Target Project: [\app\app.json] 2020-04-07T14:00:16.2755070Z Project Directory: [c:\Run\DevOps\app] 2020-04-07T14:00:16.2755397Z VSCode Settings: [c:\Run\DevOps\app.vscode\settings.json] 2020-04-07T14:00:16.2755721Z VSCode-Settings json found. 2020-04-07T14:00:16.2756023Z Loading Json Object: [c:\Run\DevOps\app.vscode\settings.json] 2020-04-07T14:00:16.2756408Z Exception occured reading VSCode-Settings json. Content: 2020-04-07T14:00:16.2787207Z ##[error] Exception occured reading json [c:\Run\DevOps\app.vscode\settings.json]: Invalid JSON primitive: . 2020-04-07T14:00:16.4187023Z { 2020-04-07T14:00:16.4189102Z "al.assemblyProbingPaths": [ 2020-04-07T14:00:16.4189966Z "./.netpackages", 2020-04-07T14:00:16.4192812Z "./Add-ins", 2020-04-07T14:00:16.4194586Z "C:/Windows/assembly/", 2020-04-07T14:00:16.4195356Z "C:/Program Files/Microsoft Dynamics NAV//Service/Add-ins", 2020-04-07T14:00:16.4196760Z "C:/Program Files/Microsoft Dynamics 365 Business Central//Service/Add-ins" 2020-04-07T14:00:16.4197407Z ], 2020-04-07T14:00:16.4197906Z "al.enableCodeAnalysis": true, 2020-04-07T14:00:16.4198572Z "al.codeAnalyzers": [ 2020-04-07T14:00:16.4199179Z "${CodeCop}", 2020-04-07T14:00:16.4199649Z "${UICop}" 2020-04-07T14:00:16.4200184Z ], 2020-04-07T14:00:16.4200694Z "al.ruleSetPath": "./custom.ruleset.json", 2020-04-07T14:00:16.4201248Z "CRS.AlSubFolderName": "Source", 2020-04-07T14:00:16.4201820Z "CRS.RemovePrefixFromFilename": true, 2020-04-07T14:00:16.4202497Z "CRS.RenameWithGit": false, 2020-04-07T14:00:16.4203055Z "CRS.RemoveSuffixFromFilename": true, 2020-04-07T14:00:16.4203817Z "CRS.FileNamePattern": "..al",
2020-04-07T14:00:16.4204778Z "CRS.FileNamePatternExtensions": "..al",
2020-04-07T14:00:16.4205618Z "CRS.FileNamePatternPageCustomizations": "..al",
2020-04-07T14:00:16.4206329Z "CRS.OnSaveAlFileAction": "Rename",
2020-04-07T14:00:16.4206903Z "CRS.ObjectNameSuffix": "_LON",
2020-04-07T14:00:16.4207571Z "git.enableSmartCommit": false,
2020-04-07T14:00:16.4208406Z "git.suggestSmartCommit": false,
2020-04-07T14:00:16.4208878Z }
2020-04-07T14:00:16.6326718Z ##[error]Because the session state for session WinRM1, e7c48abe-7a85-4978-b634-68408b7f5aad, 5db73815e7bf14e036b76242e9f7e38dbb75bc626b57b9861d284db9abc11fda is not equal to Open, you cannot run a command in the session. The session state is Closing.
2020-04-07T14:00:17.2014749Z ##[section]Async Command Start: Add Build Tag
2020-04-07T14:00:17.2015472Z Build '626' has following tags now: mcr.microsoft.com/businesscentral/onprem-1910-rtm-dk-ltsc2019, BC.Platform.15.0.36510.0, BC.Version.15.0.36626.36675, AL.Compiler.4.0.176004
2020-04-07T14:00:17.2016032Z ##[section]Async Command End: Add Build Tag
2020-04-07T14:00:17.2016976Z ##[section]Async Command Start: Update Build Number
2020-04-07T14:00:17.2017397Z Update build number to 1500.1.0.626 for build 626
2020-04-07T14:00:17.2017705Z ##[section]Async Command End: Update Build Number
2020-04-07T14:00:17.2018673Z ##[section]Finishing: ALOps Compile App
File attached. Please advice.