We are facing an issue with dotnet core SDK versions 3.3.8 and 3.3.9 when attempting to sign invoices. We are encountering the following exception:
Inner Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Data\Rules\schematrons\20210819_ZATCA_E-invoice_Validation_Rules.xsl'.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path)
at Zatca.EInvoice.SDK.Utilities.ConfigurationManager.ReadResourceFromPath(String filePath)
On a Windows VPS, we were able to resolve the issue by manually copying the folder Data
into the expected directory (C:\Data\Rules\schematrons\
), and everything worked fine. but it’s not working in the azure shared hosted and also in the Linux server.
Can you help to fix this issues?.
Thank you for support.