I am use latest Magick.NET-16-AnyCPU library only for loading images in different formats, init code is:
```
StartupPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string TempDirectory = Path.Combine(StartupPath, "Temp");
if (!Directory.Exists(TempDirectory))
Directory.CreateDirectory(TempDirectory);
MagickAnyCPU.CacheDirectory = StartupPath;
MagickAnyCPU.HasSharedCacheDirectory = false;
MagickNET.SetTempDirectory(TempDirectory);
/* int[] A = new int[1]; //VS stop Debug there!!!
A[4] = 0; */
```
as result if program have some exception before "MagickNET.SetTempDirectory(TempDirectory);", debug stopped at line with it, else (after SetTempDirectory) - see attached ScreenShot.
Comments: Yes, I have full rights. Now I try use .NET 2.0 and 4.0 versions. I have problem only with .NET 2.0 (libs from "net20" folder). With "net40-client" I am don't have problems, but I want use .NET 2.0 for better compatibility. Test Code: ``` using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; using ImageMagick; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); MagickNET.SetTempDirectory(Path.GetTempPath()); } private void Form1_Click(object sender, EventArgs e) { int[] A = new int[1]; A[100] = 12345; } } } ```
```
StartupPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string TempDirectory = Path.Combine(StartupPath, "Temp");
if (!Directory.Exists(TempDirectory))
Directory.CreateDirectory(TempDirectory);
MagickAnyCPU.CacheDirectory = StartupPath;
MagickAnyCPU.HasSharedCacheDirectory = false;
MagickNET.SetTempDirectory(TempDirectory);
/* int[] A = new int[1]; //VS stop Debug there!!!
A[4] = 0; */
```
as result if program have some exception before "MagickNET.SetTempDirectory(TempDirectory);", debug stopped at line with it, else (after SetTempDirectory) - see attached ScreenShot.
Comments: Yes, I have full rights. Now I try use .NET 2.0 and 4.0 versions. I have problem only with .NET 2.0 (libs from "net20" folder). With "net40-client" I am don't have problems, but I want use .NET 2.0 for better compatibility. Test Code: ``` using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; using ImageMagick; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); MagickNET.SetTempDirectory(Path.GetTempPath()); } private void Form1_Click(object sender, EventArgs e) { int[] A = new int[1]; A[100] = 12345; } } } ```