In the Application Properties dialog box, Compile tab, clear the check box for Register for COM interop, as shown in the following image.
Create a file in the same folder as your project file with the name " MyOEMApp.X.manifest". Replace MyOEMApp with the name of your add-in. Add the following to the manifest file. Edit the text in italics to match your add-in.
The "name" attribute of the clrClass element consists of three parts, separated by periods. The first is the name of the root namespace, as highlighted in the following image.
The second part is the namespace that the COM class is defined within. For this example is it MyOEMApp, as highlighted in the following image. The Last piece is the name of the class that implements the ApplicationAddInServer interface. In this example, it is StandardAddInServer, as highlighted in the following image.
Add a post-build process to incorporate the manifest into your .dll. The post-build process calls mt.exe, which is a Microsoft utility that embeds the manifest into the .dll of your add-in. In the Application Properties dialog box, on the Compile tab, click Build Events…. In the Build Events dialog box, click Edit Post-build…. In the Post-build Event Command Line dialog box, enter the following lines. Replace OEMTestAddin with the name of your add-in.
Remove any code associated with registering the add-in in the registry by removing the Register and Unregister methods from your add-in class. The AddInGuid property is in the same region as the registration functions. If you plan to use this property in other areas of your add-in, do not delete it.
Compile your project. The compile embeds the manifest within your .dll. If any errors occur during the compile, verify that the command string you entered matches the string in step 3.
To verify that the manifest is correctly embedded, drag the add-in .dll into Visual Studio. The "RT_MANIFEST" folder displays, as shown in the following image. Double click the "2" icon to display a window with the actual manifest data.
All registry-free add-ins require an .addin file. With a registry-based add-in, Inventor relies on the registry to get information about the add-in. The .addin file takes the place of the registry for this same information. The addin filename is in the form of Autodesk.AddInName.Inventor.addin. The following image is an example of the .addin file for an example primary add-in, with the portions to change in italics.
Descriptions of elements in the addin file example:
ClassId and ClientId Both are the same value, which is the GUID at the top of the StandardAddInServer class.
DisplayName The value can be anything, and is the name of the add-ins as shown in the Add-In Manager.
Description The value can be anything, and is the description of the add-in as shown in the Add-In Manager.
Assembly Defines the name and path of the add-in .dll, relative to the OEM bin directory. The subdirectory requires the same name as the add-in .dll.
Hidden Defines whether the add-in is visible in the Add-In Manager. A value of 1 indicates that it is hidden. However, if you right-click within the Add-In Manager and choose "Show hidden members," all add-ins display.
There can be other elements that are defined for other add-ins that either do not apply, or are ignored for an OEM primary add-in.
Create a directory in the OEM\bin directory that is the same name as your add-in .dll, (minus the .dll portion of the name. Example full path to the new directory: "C:\Program Files\Autodesk\Inventor OEM 2012\Bin\MyOEMApp")
Copy the add-in .dll to the new directory.
Copy the .addin file to one of the following directories, depending on the scope of your add-in and the operating system.
If an .addin file is present in the following locations, the add-in loads in multiple versions of Inventor, based on the values of the "SupportedSoftwareVersionXXX" settings in the manifest file.
Windows XP C:\Documents and Settings\All Users\Application Data\Autodesk\Inventor Addins\
A manifest file present in the following locations indicates that the add-in loads in a specific version of Inventor. Any values of the "SupportedSoftwareVersionXXX" settings in the manifest file are ignored.
Windows XP C:\Documents and Settings\All Users\Application Data\Autodesk\Inventor 2011\Addins\
When you save per user overrides, the manifest file generates automatically in the following locations. The settings in these manifest files override the setting values in the manifest files in the 'all users' folder. The names of these override manifest files match the names of the "master" files.
Windows XP C:\Documents and Settings\<user>\Application Data\Autodesk\Inventor 2011\Addins\