Can't use custom recipe with .Net Core
-
I have followed the instruction to install a custom recipe in .Net here: https://jsreport.net/learn/dotnet-local but I can't make it work.
- I have created a jsreport into my project folder (where the .csproj is stored)
- I have created the jsreport.config.json into the jsreport folder.
- I have installed electron-pdf using "npm install jsreport-electron" into the jsreport folder
- I used xcopy to copy this folder on build to the output directory.
- Upon build, I can see in \bin\Debug\netcoreapp2.0 the jsreport folder, with the jsreport.config.json file and the node_modules folder in it.
I still get:
Error during rendering report: Recipe 'electron-pdf' not found
When I specifiy
HttpContext.JsReportFeature().Recipe(Recipe.ElectronPdf);
What am I doing wrong?
-
Fixed it myself. I had to install jsreport-electron-pdf in addition to electron-pdf (both are needed).
-
hi!
electron-pdf
package is not needed forjsreport-electron-pdf
to work, what is needed is just theelectron
package, so installing withnpm install jsreport-electron-pdf electron
should work.probably it works for you too when installing
electron-pdf
because under the hood it installelectron
package.
-
You are right, this is a typo, I meant electron not electron-pdf