Share via

SharePoint 2019 On Perm – “Error generating solution files in temporary directory” when exporting Design Package (root cause unclear)

mohamed abdelmonem 0 Reputation points
2026-01-26T08:37:46.0333333+00:00

i Want to Know the Root Cause of IT as I tried alot to Know the Error
When attempting to create or export a Design Package in SharePoint 2019, the operation fails with the following error:
Sorry, something went wrong.

Error generating solution files in temporary directory.

Exception Details
Exception calling "Export" with "3" argument(s):

"Error generating solution files in temporary directory."

Inner Exception:

Error generating solution files in temporary directory.

at Microsoft.SharePoint.SPSolutionExporter.ExportWebAsSolution()

at Microsoft.SharePoint.SPSolutionExporter.ExportWebToGallery(...)

at Microsoft.SharePoint.Publishing.DesignPackage.Export(...)

Microsoft 365 and Office | SharePoint Server | Development
0 comments No comments

1 answer

Sort by: Most helpful
  1. Teddie-D 17,800 Reputation points Microsoft External Staff Moderator
    2026-01-26T10:53:47.7133333+00:00

    Hi @mohamed abdelmonem 

    Thank you for posting your question in the Microsoft Q&A forum. 

    Please note that this is a user-to-user support forum. Moderators, contributors, and external Microsoft employees do not have access to back-end systems to investigate root causes. Our role here is limited to sharing technical guidance based on publicly available resources and experience. 

    From my research, the error message “Error generating solution files in temporary directory” during a Design Package export in SharePoint 2019 is most often related to permissions issues on the temporary directories used by the SharePoint service account, rather than a problem with the directory itself. 

    When SPSolutionExporter runs, it must write temporary files into: 

    • C:\Windows\Temp 
    • %USERPROFILE%\AppData\Local\Temp of the SharePoint Timer Service account. 
    • Sometimes the Application Pool identity temp folder if export is triggered interactively in Central Admin. 

    If the account running the export does not have sufficient rights to these folders, SharePoint will surface a misleading error pointing to the temporary directory, even though the underlying issue is NTFS permission corruption. 

    -You should restore correct default permissions to the relevant temporary folders rather than switching accounts. 

    -Grant Modify permission to both the SharePoint Timer Service account and the Web Application App Pool identity on C:\Windows\Temp and their corresponding %LOCALAPPDATA%\Temp folders.

    -After adjusting permissions, run an IISRESET and retry the Design Package export. 

    You can test with another service account to confirm the issue, but that should only be used for troubleshooting. The long-term solution is to correct the folder permissions 

    I hope this information is helpful. 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.