How To Build Sample Projects In After Effects SDK

GOAL

Today’s goal is to build sample projects in AE SDK.

Environment

Windows10
Visual Studio 2015 Community
After Effects CC2019
After Effects 17.1.2 Win SDK

Method

Download AE SDK

Access Adobe Developer Console (https://console.adobe.io/servicesandapis) and sign in with your Adobe user account.

Select After Effects “View downloads” and download After Effects Plug-in SDK. Then extract downloaded folder.

Build single plug-in

Select project

Open AfterEffectsSDK\Examples and select a project that you’d like to build. For example, “AfterEffectsSDK\Examples\AEGP\Artie” is one of the project directory. See the list of sample project in Sample Project Descriptions.

Open solution file

Open the solution file (for example, AfterEffectsSDK\Examples\AEGP\Artie\Win\Artie.sln) with Visual Studio 2015(v140). While you can use later versions, you should upgrade the project from v140 to using version.

The message displayed when opening solution file with VS2017

Related article: How To Install Older Visual Studio

Change properties

Change properties to avoid errors.

1. C/C++ > General > Treat Warnings As Errors

To avoid error “Error C2220 warning treated as error – no ‘object’ file generated Artie” caused by a warning “Warning C4819 The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss”, set the flag “Treat Warnings As Errors” off.

You can also solve this problem by removing all warnings.

2. Linker > Debugging > Generate Debug Info

If current configuration is “Release”, to avoid an error “Error MSB4018 The “Link” task failed unexpectedly.”, change the “Generate Debug Info”. “Generate Debug Info” should be set “No” instead of “”(nothing).

The following is an example of this Linker error.

Error	MSB4018	The "Link" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Build.CPPTasks.Link.ForcedRebuildRequired()
   at Microsoft.Build.CPPTasks.TrackedVCToolTask.ComputeOutOfDateSources()
   at Microsoft.Build.CPPTasks.TrackedVCToolTask.SkipTaskExecution()
   at Microsoft.Build.Utilities.ToolTask.Execute()
   at Microsoft.Build.CPPTasks.TrackedVCToolTask.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

Build and check the output

Click Build > Build Solution.

You can find Artie.aex file in the output directory.

For the sake of simplicity I set the output directory “$(Platform)\$(Configuration)\” that is the same as Intermediate Directory. The output directory is C:\Users\…\AfterEffectsSDK\Examples\AEGP\Artie\Win\<x64>\<Release>.

You can change the output directory by inputting the path or setting environment variable “AE_PLUGIN_BUILD_DIR”.

Build all plug-in

Open BuildAll.sln in C:\Users\…\AfterEffectsSDK\Examples with Visual Studio 2015. And build solution “BuildAll” with removing errors.