In the Application Properties dialog box, Build tab, in Output, clear the check box for"Register for COM interop.
Create a file in the same directory as your project file, and name it "CPPOEMAddIn.X.manifest". Replace CPPOEMAddIn with the name of your add-in. Add the following lines to the manifest file. Edit the text in italics to match your add-in.
The name of the assemblyIdentity element is the name of the project, as highlighted in the following image.
The clsid is the class ID for your add-in and it is located in the .idl file associated with your add-in, as shown in the following image. The braces are required in the manifest file.
The name attribute of the clrClass element consists of two parts, separated by periods. The first part is the name of your project. In this example, it is CppOEMAddIn. The second part is the name of the class that implements the ApplicationAddInServer interface, which is "CppOEMAddInAddInServer":
Configure the project settings to embed the manifest correctly within the .dll. The first two settings are part of the Linker settings. The settings and the values to change them to are highlighted in the following image. In some cases, the values for these settings are already correct.
Next are the Manifest Tool settings. Set Embed Manifest to Yes, as shown:
In the Build Events section of the settings, remove the post-build step that registers the add-in in the registry. Clear any text from the Command Line field, as shown in the following image.
Remove any code from the project that supports the registration of the add-in in the registry. This action removes the .rgs file associated with the project, and deletes the DllRegisterServer and DllUnregisterServer functions.
Compile your project. If any errors occur during the compile, verify that the command string you entered matches the string in step 2.
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\