Frequently Asked Questions

This topic contains answers for frequently asked questions concerning Graphics Mill.

In this topic:

How to Resolve FileLoadException

Description

Graphics Mill requires the Microsoft Visual C++ Redistributable Package to be installed on a development machine. The package is installed automatically during the Graphics Mill installation process; however, this step can be skipped. If this has occurred, the following error displays when running a Graphics Mill application:

FileLoadException: Could not load file or assembly 'Aurigma.GraphicsMill, Version=1.0.4543.2441, Culture=neutral, PublicKeyToken=f4bbbf243f314012' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1).

Resolution

To resolve the problem, you should install the Microsoft Visual C++ Redistributable Package. You can download it from the Microsoft site:

The links above provide x86 (32-bit) and x64 (64-bit) editions of the package. Install the x64 package if you use 64-bit Graphics Mill assembly, and x86 package otherwise.

Note

Alternatively, you can find these packages in the Graphics Mill installation folder at C:\Program Files\Aurigma\Graphics Mill 9\.Net XX\VCRedists.

How to Resolve BadImageFormatException

Desktop Application

Description

This problem occurs when you try to run a 32-bit desktop application on a 64-bit machine. The error message displayed is:

BadImageFormatException: Could not load file or assembly 'Aurigma.GraphicsMill, Version=1.0.4543.2441, Culture=neutral, PublicKeyToken=f4bbbf243f314012' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Resolution

This error is caused by an incorrect value for the Platform target setting in the project properties. The Platform target is set to Any CPU by default. To run the application correctly, you should change the value of the Platform target to x86 and recompile your application. For C# projects, follow these steps:

  1. Open your application in Visual Studio.
  2. On the main menu, click the Project and select Properties....
  3. Expand the Build tab and change the Platform target to x86.
  4. Rebuild the project and run it.

For VB projects, follow these steps:

  1. Open your application in Visual Studio.
  2. On the main menu, click the Project and select Properties....
  3. Expand the Compile tab and click the Advanced Compile Options...
  4. Change the Target CPU to x86.
  5. Rebuild the project and run it.

Web Application

Description

This problem occurs when you try to access a 32-bit web application that is running under IIS on a 64-bit machine. By default, a 64-bit application pool disables to run 32-bit applications. The error message is the following:

[BadImageFormatException: Could not load file or assembly 'Aurigma.GraphicsMill' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
	System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
	System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark stackMark, Boolean forIntrospection) +416
	System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark stackMark, Boolean forIntrospection) +166
	System.Reflection.Assembly.Load(String assemblyString) +35
	System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190

Resolution

To enable 32-bit applications, follow these steps:

  1. Open the Internet Information Services (IIS) Manager.
  2. On the Connections list, expand the connection used by your application and select Applications Pools.
  3. Select the application pool under which your web application is running.
  4. On the Actions menu, click Advanced Settings....
  5. Set Enable 32-Bit Applications to True.
  6. Restart IIS and re-run your application.

How to Resolve UnsupportedPixelFormatException

Description

This problem occurs when you try to apply an operation that is incompatible with an image's pixel format. For example, you cannot draw on CMYK images or save JPEGs in the 48 bit RGB format.

Resolution

To solve this problem, convert an image to a pixel format supported by the desired operation as it is described in the Converting Colors with Color Management topic. To determine whether a given pixel format is supported use the IsPixelFormatSupported(PixelFormat) method.

How to Resolve License Compiler Exception 0x80131621

Description

According to Graphics Mill documentation, you can embed a production license key into the resources using Licenses.licx file. However, if you use .NET 4.0 as a target framework, you will get the following error:

LC : error LC0000: 'Could not load file or assembly 'Aurigma.GraphicsMill' or one of its dependencies. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)'

0x80131621 means: "Mixed mode assembly is built against version '2.x.x' runtime and cannot be loaded in 4.x.x. runtime without additional configuration information."

Resolution

To solve this problem, change the license compiler configuration. Create the lc.exe.config file in the same folder, as the lc.exe (typically, C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\ folder), and fill it with following code:

<?xml version="1.0"?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
  </startup>
</configuration>

Other problems

If your problem is still unresolved: