Upgrading 3ds Max .NET projects from .NET Framework to .NET 8

3ds Max 2025 and earlier versions have relied on the .NET Framework for building plugins. However, with the VFX world transitioning to .NET, 3ds Max 2026 fully embraces this change. As a result, .NET projects require a bit of housekeeping to compile and work with .NET 8. This post is a simple walkthrough of the upgrade process, using the public Explode Geometry Sample hosted on our ADN GitHub Page here.


The Upgrade Assistant

Microsoft provides an Upgrade Assistant extension to help port .NET Framework projects to modern .NET versions. The tool simplifies the upgrade intricacies, leaving just a few steps for us to complete.

First, check if you have the Upgrade Assistant installed. If not, open Visual Studio and navigate to Menu > Extensions > Manage Extensions. Search for ‘Upgrade Assistant’ and install it as shown below.

Image002

Follow the instructions to install the assistant. You may need to restart the IDE for the extension to load. Note that the Upgrade Assistant is available as both a Visual Studio extension and a command-line utility; this blog only covers the Visual Studio extension.


Explode Geometry Project .NET Upgrade

Let’s use our ADN Explode Geometry sample to demonstrate how to get a project building and running with .NET 8.

Fetching the Project

Clone the repository (using SSH, HTTPS, or ZIP). Since the main repo is already updated, we’ll clone the branch tagged v2.7 for this process:

git clone --branch v2.7 https://github.com/ADN-DevTech/3dsMax-Explode-Geometry
cd 3dsMax-Explode-Geometry

In the Source folder, open the .csproj file in Visual Studio.

Upgrading to .NET via the Assistant

As detailed in the Microsoft Documentation, start the upgrade process by Right-Clicking the project > Upgrade. A new project upgrade page will open.

We’ll use the in place project upgrade option, but you’re free to test other options.

Image003

Next, select the target .NET version. For 3ds Max 2026 .NET plugins, we’re targeting .NET 8.0 LTS.

Image004

If prompted to download and install the .NET SDK, complete that step before proceeding. Then, select the files to upgrade (leaving all files checked) and continue.

Once the process completes, the project will be transformed. You can review the logs by switching the combo box to the Upgrade Assistant option:

Image005

At this point, the .csproj file conforms to the .NET 8 format, but a subsequent build will likely fail due to missing references to the Autodesk assemblies that were dropped during the upgrade.

Fixing Missing Assemblies

To fix the missing Autodesk or third-party assemblies, you have two options:

Option 1: Direct `.csproj` Editing

Directly edit the .csproj file. Copy the <ItemGroup> for the assemblies from the old project file and update where necessary. For instance, for the Autodesk.Max.dll assembly, ensure it is included with the correct version (2026 in this case):

<ItemGroup>
    <Reference Include="Autodesk.Max">
        <HintPath>$(ADSK_3DSMAX_x64_2026)\Autodesk.Max.dll</HintPath>
    </Reference>
    .... other assemblies
</ItemGroup>

Option 2: Using the Reference Manager

Use the Visual Studio Reference Manager via Menu > Project > Add Project Reference > Browse. Locate and select all intended libraries, then click OK.

After adding them, you can manually update the assembly paths for Autodesk dependencies to use path variables like $(ADSK_3DSMAX_x64_2026)\&lt;assembly name&gt; to ensure portability across different installation paths.

Image006

Defining the Output Path

After fixing references, running a build might still send the output to the default Visual Studio directory. In the old .NET Framework, this was handled by <OutputPath> inside each build type. In modern .NET, it’s defined inside the main <PropertyGroup>:

<PropertyGroup>
    <TargetFramework>net8.0-windows</TargetFramework>
    ... the other config here
    <OutputPath>C:\Our\intended\path\for\the\assembly</OutputPath>
</PropertyGroup>

Set the output path to the Autodesk plugin path so that changes are immediately reflected in the sample.

(Note: If you use a PackageContents.xml, ensure it is updated for assembly loading. Refer to the Menu System Porting and Packaging Samples documentation for help.)


Final Housekeeping

To finalize the migration, perform these crucial housekeeping steps:

Set Assemblies as Not Private

By default, the build process copies assembly references to the OutputPath, resulting in duplication that can crash 3ds Max. Prevent this by setting the <Private> flag to false for each included assembly, such as ManagedServices.dll:

<Reference Include="ManagedServices">
    <HintPath>
        $(ADSK_3DSMAX_x64_2026)\ManagedServices.dll
    </HintPath>
    <Private> false </Private>
</Reference>

Disable Target Framework Output Flag

Since 3ds Max plugins are for Windows, disable the AppendTargetFrameworkToOutputPath flag to prevent assemblies from being nested in a target framework directory:

<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>

Version and Library Updates

Finally, consider these updates:

  • Update/bump up plugin versions, including `ApplicationVersion` and `AssemblyVersion`.
  • Add any additional library information that may have been lost or is new to the project format, such as `FileVersion`.

The full sample code can be found in our ADN Github Repo.


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading