DLL development for custom API
The approach I recommend is not dealing with the DLL file manually. Instead, create a Visual Studio solution that included both the .NET (typically C#) project where you defined the class library, and X++ project using the library. Build the .NET library and then add a project reference from the X++ project to the .NET project. The DLL is built and put to the right place automatically, you just need to add the AOT reference node and the DLL file to source control.
Note that this approach also makes debugging easier, because you can step from X++ code directly to the .NET code in debugger.