Now that you have a created a project and defined a command, you are almost ready to execute the command in AutoCAD. Before you can execute the command in AutoCAD, you need to first compile or build a .NET assembly file for your project.
For this exercise, you will be generating a Debug version of the project but you will not learn about using the Debug environment at this time. For more information on debugging a project, see the documentation that comes with your development environment. To load use the Debug environment with AutoCAD, see Load an Assembly into AutoCAD.
If you want to distribute your project for others to use, you will need to build a .NET assembly from your project. For more information on sharing your .NET assembly with others, see Distribute Your Application.
Once a .NET assembly is built, you can then load it into AutoCAD with the NETLOAD command.
To build a project and load a .NET assembly into AutoCAD
The project should build successfully, unless something is wrong with the code in the project. Look at the Output window for information on the build status of the project. The location of the MyFirstProject.dll file that is built is also displayed in the Output window.
A new MText object is created at the coordinates 2,2 with the text string “Greetings, Welcome to the AutoCAD .NET Developer's Guide“.