|
Rank: Member Groups: Member
Joined: 6/14/2013 Posts: 11
|
Hello Team,
I have a EOPDF implementation that is on azure function, currently we are using the 2022 version of EOPDF on .Net 6 Azure function. We are in the process of upgrading the Azure function to .Net 8 and also upgrading to 2024 version of EOPDF. While testing locally the changes in the dll works without need to change anything, however once deployed it gives error "Could not load file or assembly 'System.Drawing.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=XXXXX. The system cannot find the file specified."
Can you help me with this issue fix?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
We do not reference this assembly directly and I do not believe this assembly exists on .NET 8. Do you have the full call stack of this problem? Do you have any explicit assembly redirection in your config file?
Thanks!
|
|
Rank: Member Groups: Member
Joined: 6/14/2013 Posts: 11
|
We are using it to set OutputArea and PageSize to pass the parameter - htmltopdfOptions for `ConvertUrl()`
I was able to set PageSize = PdfPageSizes.A4; but how to customize if or set OutputArea
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
We looked into this further and in fact System.Drawing.Primitives is part of .NET 8. You can verify this by checking Dependencies -> Frameworks -> Microsoft.NETCore.App and you should see System.Drawing.Primitives there.
You can try to set your publish mode as "Self-Contained" and then rebuild your function app. You should see System.Drawing.Primitives.dll in your output directory. You can then make sure this file is deployed to your server.
Thanks!
|
|