Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong destination path, not running with azure-function, #2

Open
AndyG74 opened this issue Apr 22, 2020 · 4 comments
Open

wrong destination path, not running with azure-function, #2

AndyG74 opened this issue Apr 22, 2020 · 4 comments

Comments

@AndyG74
Copy link

AndyG74 commented Apr 22, 2020

the wkhtmltopdf binaries will be copyed in a wrong folder.

DestinationFiles="$(OutDir)\wkhtmltopdf<plattform><bitness>\wkhtmltopdf" is not ok for AzureFunction.

it must be:
DestinationFiles="$(OutDir)\bin\wkhtmltopdf<plattform><bitness>\wkhtmltopdf"

the start of any azurefunction is "../bin/court4u.AzureFunction.dll"
image

but the binaries not copyed in the correct bin-folder
image

do you can fix this? or do you have any workaround?

@ping9719
Copy link

ping9719 commented Apr 23, 2020

我也遇到了这个问题,并且我解决了这个问题。
(I had this problem, and I solved it)

我猜测你和我一样,有多个“解决方案”。
(My guess is that you, like me, have multiple "solutions.")

如图所示:
(as shown in the figure)
image

这样子就可以解决
(That's how it works)
image

总结:
(summarize)

在所有你使用到的“解决方案”中,都安装【PugPDF.Core】包,就可以完美解决此问题。
(Install the [PugPDF.Core] package in all the "solutions" you use to solve this problem.)

2020.04.23 13:14

@pug-pelle-p
Copy link
Owner

pug-pelle-p commented Apr 29, 2020

@AndyG74 Did it work by adding the nuget to the host project?

If not maybe you can try to change the output dir for the project.
<OutputPath>somedir</OutputPath>

I know that there are some project that will output to /bin and some are not, but not sure how to determine which it is in the .target file

@AndyG74
Copy link
Author

AndyG74 commented Apr 29, 2020

hi, no that is not a solution for AzureFunctions. i have try to copy the wkhtmltopdf-folder by post-build event, but also this is not a solution.

a valid solution is:

  • deploy the azurefunction with the visual studio to azure-cloud
  • then copy the wkhtmltopdf-folder to the correct azurefunction-bin-folder

@pug-pelle-p
Copy link
Owner

I'm thinking of removing the publish step (that moves the binaries to the publish folder) and instead unpacking the binaries in runtime by writing it to a temp folder. Would that work for azure functions? Does it have write access?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants