Re: Building c# sample plugin
Posted: Mon 16. Sep 2013, 12:47
Hi,
I think I worked it out.
The assembly version is stored in the file Resources\Main.res. We had to add a non-.NET resource file to the project that contains some bitmaps and strings - PCAN-Explorer looks for these resources when it loads the Add-in. It appears that if such a .res file is added, .NET ignores the version numbers in the Assembly Information and expects a version resource instead. Therefore we had to include the version information in the .res file as well. Just open the Main.res file in the IDE and change the version numbers there.
The other problem concerning the blank tab is caused by a failed assembly registration. The assembly must be COM-visible so that PCAN-Explorer can load the controls contained in the assembly. COM visibility requires that some registry keys must be written under HKEY_LOCAL_MACHINE during registration, which is only possible with administrator privileges. To correct the registration, do the following:
1. Open the Add-in Manager dialog box and unload the .NET sample DLL
2. Restart PCAN-Explorer with administrator privileges
3. Open the Add-in Manager dialog box and set the check mark for your Add-in, press OK.
Now the assembly registration should succeed and when you use the Add-in the tab should no longer be blank.
Regards
I think I worked it out.
The assembly version is stored in the file Resources\Main.res. We had to add a non-.NET resource file to the project that contains some bitmaps and strings - PCAN-Explorer looks for these resources when it loads the Add-in. It appears that if such a .res file is added, .NET ignores the version numbers in the Assembly Information and expects a version resource instead. Therefore we had to include the version information in the .res file as well. Just open the Main.res file in the IDE and change the version numbers there.
The other problem concerning the blank tab is caused by a failed assembly registration. The assembly must be COM-visible so that PCAN-Explorer can load the controls contained in the assembly. COM visibility requires that some registry keys must be written under HKEY_LOCAL_MACHINE during registration, which is only possible with administrator privileges. To correct the registration, do the following:
1. Open the Add-in Manager dialog box and unload the .NET sample DLL
2. Restart PCAN-Explorer with administrator privileges
3. Open the Add-in Manager dialog box and set the check mark for your Add-in, press OK.
Now the assembly registration should succeed and when you use the Add-in the tab should no longer be blank.
Regards