Summary
Maya SDK (DevKit) provide API for .NET.
It requirements can be found in Maya Help ([1], [2]), it’s below:
- The .NET SDK is installed with Maya as of Extension 2 for Maya 2013.
- The Maya .NET API uses the .NET 4.5 Framework and is compatible with .NET 4.0 Framework.
- The Maya .NET SDK is available in 64-bit only. Ensure that your Maya .NET plug-in projects are also compiled in x64.
Microsoft published lifecycle of .NET Framework v4.5.2 It will end on April 26, 2022.
Support for .NET Framework 4.5.2, 4.6, and 4.6.1 will end on April 26, 2022. Customers and developers must have completed the in-place update to .NET Framework 4.6.2 or later by April 26, 2022 to continue receiving technical support and security updates.
https://docs.microsoft.com/en-us/lifecycle/faq/dotnet-framework#what-is-the-microsoft-lifecycle-policy-for–net-framework-
However, Maya’s help has the following description.
The Maya .NET API uses the .NET 4.5 Framework and is compatible with .NET 4.0 Framework.
https://help.autodesk.com/view/MAYAUL/2022/ENU/?guid=Maya_SDK_Maya_NET_API_Getting_started_with_NET_API_html
No description was found to indicate that the Maya API supports .NET Core in Maya help. And, No active exchange of ideas was found in the online community. I have reached this thread the community.
On the other hand, the .NET ecosystem is powerful. So, let’s try to build an example Maya plugin.
Prerequisites
- Maya 2022.2
- Maya 2022 Update 2 win64 DevKit
- Windows 10 v21H1
- Visual Studio 2019
Steps
Steps of building an example Maya plugin with .NET is here.
- Get devkit from Maya Developer Center.
- Open
examples.sln
.- examples.sln is below:
- C:\Autodesk_Maya_2022_2_Update_DEVKIT_Windows\devkitBase\devkit\dotnet\examples\examples.sln
- The solution file contain
examples.csproj
. It specified .NET Framework 4.5.1 in Target framework. - .NET Framework 4.5.1 ended on January 12, 2016. Anyway, I will continue to build an example Maya plug-in with the current settings…
- examples.sln is below:
- Click
Add Reference...
, then importopenmayacs.dll
.- openmayacs.dll is below:
- C:\Program Files\Autodesk\Maya2022\bin\openmayacs.dll
- openmayacs.dll is below:
- Create
examples.nll.dll
with Build Solution (Ctrl + Shift + B
).- examples.nll.dll is below:
- C:\Autodesk_Maya_2022_2_Update_DEVKIT_Windows\devkitBase\devkit\dotnet\examples\assemblies\examples.nll.dll
- examples.nll.dll is below:
- Copy
examples.nll.dll
to yourMAYA_PLUG_IN_PATH
.- MAYA_PLUG_IN_PATH include
C:\Program Files\Autodesk\Maya2022\bin\plug-ins
as value.
- MAYA_PLUG_IN_PATH include
- Load
examples.nll.dll
on Maya.- Click
Windows > Settings/Preferences > Plug-in Manager
. - Search with
examples
in the Plug-in Manager. - Click
Loaded
.
- Click


openmayacs.dll
as reference
examples.nll.dll
Result
Type helloWorldCmdCSharp
to Script Editor. The editor display by clicking Windows > General Editors > Script Editor
.

Run command, then the Script Editor will display Hello World
.
