---
title: "Using Graphics Mill in .NET projects"
canonical: https://www.graphicsmill.com/docs/gm/using-graphics-mill-in-dotnet-projects.htm
product: "Graphics Mill"
---

# Using Graphics Mill in .NET projects
 
You can use Graphics Mill in .NET Framework projects and in .NET projects (formerly named .NET Core). The NuGet packages contain a separate build for each of them. NuGet selects the right build for your project automatically.
 
Graphics Mill is a Windows-only library. You cannot use it on other platforms.
 
## Available Builds
  
|  Your project targets |  Build that is used |
| --- | --- |
   |  .NET Framework 4.7.2 or higher |  `net472` |
 |  .NET 9 or higher (for example, `net9.0-windows`) |  `net9.0-windows7.0` |
 |  Earlier versions of .NET |  `net472`, in the .NET Framework compatibility mode |
 
The Graphics Mill packages are still separate for each platform. Install `Aurigma.GraphicsMill.Core.x64` or `Aurigma.GraphicsMill.Core.x86`, so that it matches the platform of your application.
 
## Using the .NET 9 Build
  
The .NET 9 build is a mixed-mode assembly. It works with the same API as the .NET Framework build. When you install the NuGet package, the following files are added to your project automatically:
 
- `Ijwhost.dll` is the native library that loads a mixed-mode assembly. It must be in the same folder as `Aurigma.GraphicsMill.dll`. If you copy the files of your application manually, copy this file too.
- **System.Drawing.Common** is a package that provides the **System.Drawing** types.

### Differences from the .NET Framework Build
 
Some features depend on the .NET Framework and are not available in the .NET 9 build:
 
- **Settings in `App.config`.** The .NET 9 build does not read the `appSettings` section. It ignores **GraphicsMillTempPath**, **GraphicsMillEnableTelemetry**, and the license key. Set these values in code instead. See [Graphics Mill Configuration](https://www.graphicsmill.com/docs/gm/graphics-mill-configuration.htm.md) for the code equivalents.
- **License key in `Licenses.licx`.** The .NET 9 build cannot read a license key that is embedded into the resources of an assembly. Use another [way to register the key](https://www.graphicsmill.com/docs/gm/registering-production-license-keys.htm.md), for example, in code or with the `GRAPHICSMILL_LICENSE_KEY` environment variable.
- **Binary serialization.** Binary formatters are deprecated in recent versions of .NET, so you cannot use them to serialize Graphics Mill objects.

Everything else works as in the .NET Framework build.
 
## Using the .NET Framework Build in Earlier Versions of .NET
  
You can also reference the `net472` build in projects for earlier versions of .NET. It works because of the .NET Framework compatibility mode introduced in .NET Standard 2.0. You can find more details in the [Overview of porting from .NET Framework to .NET](https://learn.microsoft.com/en-us/dotnet/core/porting/).
 
This build has references to the **System.Drawing** and **System.Configuration.ConfigurationManager** namespaces. Microsoft provides their implementation for the .NET platform. When you install Graphics Mill with a NuGet package, the corresponding packages are added automatically.
 
Almost all the functionality is implemented in native code. So the work of Graphics Mill in this mode differs only in the following aspects:
 
- You cannot use a license key that is embedded into an assembly with the `Licenses.licx` file.
- You cannot serialize objects, because binary formatters are deprecated in recent versions of .NET.

Everything else works as expected.
 
## See Also
  
### Manual
 
- [System Requirements](https://www.graphicsmill.com/docs/gm/system-requirements.htm.md)
- [Graphics Mill Configuration](https://www.graphicsmill.com/docs/gm/graphics-mill-configuration.htm.md)
- [Registering Production License Keys](https://www.graphicsmill.com/docs/gm/registering-production-license-keys.htm.md)
