Page 1 of 1

How to use temporary-path from C# code? (windows)

Posted: 2018-07-13T03:08:10-07:00
by Ljurka
Hello!

Does anybody knows how to set up temporary-path from C# (not from command line and not from env var)

I have to run my app on server and could not give write access to the default path where magick stores temp files (..\Windows\system32\..)

Thank you

Re: How to use temporary-path from C# code? (windows)

Posted: 2018-07-13T07:59:58-07:00
by 246246
Use MagickNET.SetTempDirectory(). See https://github.com/dlemstra/Magick.NET/ ... -directory

Re: How to use temporary-path from C# code? (windows)

Posted: 2018-07-16T07:07:37-07:00
by Ljurka
Thanks but I could not find example of usage, where should I apply MagickNET.SetTempDirectory("c:/temp")

Re: How to use temporary-path from C# code? (windows)

Posted: 2018-07-16T07:38:12-07:00
by 246246
It just call Environment.SetEnv().
https://github.com/dlemstra/Magick.NET/ ... ET.cs#L262
So it should be called at the very first of each process that uses Magick.NET.