Community
3ds Max Forum
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting a Runtime Error trying to Load DLL with dotNet API

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
diepreyeYRJFU
627 Views, 3 Replies

Getting a Runtime Error trying to Load DLL with dotNet API

Hey,

 

I am having issues trying to use my C# code in Maxscript. I just wrote a test cs code and Maxscript to test the two's functionality. The code isn't anything complex at all but I keep getting the following output and error:

dotNetObject:System.Reflection.RuntimeAssembly
-- Error occurred in anonymous codeblock; filename: C:\Users\diepreye\Desktop\.net 3ds max plugin prac\dotnet_api_test.ms; position: 117; line: 3
-- Runtime error: Cannot resolve type: Sandbox.TestObject
-- MAXScript callstack:
-- thread data: threadID:22972
-- ------------------------------------------------------
-- [stack level: 0]
-- In top-level

I have also attached a copy of the C# code and the Maxscript code below. I have no idea why it isn't working especially since I search and see others doing the same and having no issues.

Labels (1)
3 REPLIES 3
Message 2 of 4
RobH2
in reply to: diepreyeYRJFU

Have you installed the latest dotNET update for Windows?


Rob Holmes

EESignature

------------------------------------------------------------------------------------------------------------------------------------------
3ds Max (2023-2025), V-Ray 6.2, Ryzen 9 3950-X Processor, DDR 4 128MB, Gigabyte Aorus X570 Master motherboard, Sabrent Rocket NVMe 4.0 M.2 drives, NVidia RTX 4090, Space Pilot Pro, Windows 11 Pro x64, Tri-Monitor, Cintiq 13HD, Windows 11 x64
------------------------------------------------------------------------------------------------------------------------------------------
Message 3 of 4

Yes I have .NET 8.0 installed

Message 4 of 4

Alright, I have seen the issue. It seems 3ds Max doesn't like/fully support .NET 8.0 SDK yet. I retried writing my plugins and test code using the .NET 4.8 Framework which works perfectly.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report