Problem creating a form addin with the C# SDK

Hi all,

I'm trying to create a form add-in spec using the C# SDK but the supplementary files (CodeGen, etc.) aren't being created so I can't access the fields of the parent UI model. I found a KB article discussing this issue with a note from BB that they were investigating and would update the article when a solution was found. That was in 2018 and the article in question hasn't been updated. Has anyone found a workaround for this issue?

Thanks,

Ray Porter

Comments

  • I used a decompiler…

  • @Ray Porter

    Has any solution or workaround for this issue been found? It was first noted in 2018 and there still doesn't appear to be a solution now, 6 years later.

  • @Ray Porter
    Hi Ray,

    The only workaround I have found to this problem is to create the addin in a Visual Basic project, then copy the .CodeGen.vb into a code translator, and paste the translated code back into the code file for your C# addin. Full steps are below. Agreed that this is a problem that should have been solved in the SDK a very long time ago.

    To get a CSharp Addin working:
    1) Create the addin in a VB project
    2) Copy the contents of the .CodeGen.vb file
    3) Convert those contents into C# using this converter (the Telerik one wont work for some reason)
    https://icsharpcode.github.io/CodeConverter/
    4) Copy their results and just paste it into the main CS file (do not try to keep it in a separate file)
    5) Add the namespace declaration around the pasted results
    6) Replace "Global." with nothing (i.e., get rid of "Global." in the file)
    7) Add whatever logic you want to the "OnInit" method.
    8) Deploy

  • @Ray Porter
    Just did a quick search and the KB article you mentioned is here:

    It looks like Blackbaud has no intention of resolving this issue, which is a shame.

Categories