SparkleXrm icon indicating copy to clipboard operation
SparkleXrm copied to clipboard

"Solution section not found in spkl.json"

Open bwmodular opened this issue 4 years ago • 3 comments

I can't help thinking that I'm missing something totally obvious.

I've created a new VS Project to hold webresources, edited my spkl.json to look like this: { "webresources": [ { "profile": "default,debug", "root": "webresources", "solution": "MYSOLUTIONNAME", "files": [ ] } ] } When I run download-webresources.bat I get this error message:

Solution section not found in spkl.json This is needed to determine where to store the webresources!

I'm sure it's staring me in the face but I can't figure it out.

bwmodular avatar Jul 04 '21 16:07 bwmodular

Also adding the /o option (download-webresources /o) gives this error Invalid command "/o"...

bwmodular avatar Jul 04 '21 17:07 bwmodular

I believe it needs the solutions section as described by https://github.com/scottdurow/SparkleXrm/wiki/spkl#mapping-the-solution-pack-to-build-artefacts https://github.com/scottdurow/SparkleXrm/blob/f54f910116a61010767fe00d5c48218488da0be2/spkl/SparkleXrm.Tasks/Tasks/DownloadWebresourceFileTask.cs#L82

I think you are right though - it should use the solution field from the webresources config - perhaps this could be an enhancement.

scottdurow avatar Jul 05 '21 17:07 scottdurow

Thanks Scott, adding in a solutions section fixed the problem. I think what was confusing me is that the error said "Solution section not found". I could see that the "Solution" attribute was there, but it was the the "Solutions" (plural) section which was not. If I'm really brave I'll try and submit a PR which gets the solution name form the solution attribute if the solutions section is not there...

bwmodular avatar Jul 10 '21 22:07 bwmodular