RickStrahl / Westwind.RazorHosting

Hosting the Razor Runtime outside of ASP.NET/MVC for use in non-Web .NET applications.
144 stars 32 forks source link

temp files #20

Closed ehsaanwelcome closed 6 years ago

ehsaanwelcome commented 6 years ago

Is there any way to delete generated temporary files?

RickStrahl commented 6 years ago

You can have assemblies generated into memory to avoid creating the temp files in the first place. If you are using disk assemblies then no there's no way to delete them as part of the application because they will be locked. The best approach is to choose a folder that you control and delete files in that folder before you start up cleaning up old files.