You may or not be aware that ASN1C includes a Visual Studio Wizard that you can use from Visual Studio to build a library from one or more ASN.1 files. If you have at least ASN1C v732, the wizard is present and usable.

The files for the wizard are in the vswizard folder of your ASN1C installation. There are three files here that are the components of the wizard: ASN1CWizard.ico, ASN1CWizard.vsdir, and ASN1CWizard.vsz. There is also a README.txt file here that provides instructions for configuring and installing the wizard. One of the steps is to modify the .vsz file, and note in particular the instructions to remove the comment-like lines that are at the top. In ASN1C v7.4, which will likely be released in January, this .vsz file will be generated during the installation, and there will no longer be a need to edit it.

Once the files for the wizard are correct and in place, you can use Visual Studio to create a new project just like you normally would, but now you can choose ASN1C as the project type. The wizard will invoke the ASN1C GUI, with some of the irrelevant options disabled. You can use the GUI to choose the ASN.1 files and define how you want the code to be generated for your library. Then you click on the Compile button to generate the code and a Visual Studio project file. Once you exit the GUI, the project file will be loaded into Visual Studio.


Published

Category

ASN1C