<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic TypeLoadException for Hello Ribbon in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9831314#M30797</link>
    <description>&lt;P&gt;I've been searching for a basic "Hello Ribbon" tutorial that creates a simple button on a new Ribbon tab, but haven't yet found one. I was recently pointed to:&lt;/P&gt;&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/files/revit_2014_api_developer_guide.pdf" target="_blank"&gt;https://thebuildingcoder.typepad.com/files/revit_2014_api_developer_guide.pdf &lt;/A&gt;&lt;/P&gt;&lt;P&gt;which has a decently basic one on page 18. It did require a separate "Hello World", but that was easy enough. My problem with this one is the attached error when it tries to load in Revit. This page:&lt;/P&gt;&lt;P&gt;&lt;A href="https://adndevblog.typepad.com/aec/2013/03/systemtypeloadexception-with-revit-add-in.html" target="_blank"&gt;https://adndevblog.typepad.com/aec/2013/03/systemtypeloadexception-with-revit-add-in.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;seems to indicate it's something related to actually finding the dll, the namespace, and/or the .NET version. I've tried various things, and am using 4.6 (for Revit 2018) as far as I can tell, but still get the error. I've attached my VisualStudio solutions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the larger scheme of things I'd like to have a self-contained example (that produces ONE .dll to deploy), so that I can scale it up later, but at this point I'd settle for getting anything to work properly (other examples I've tried recently or over the years have resulted in a panel but no button, or other weirdness).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TypeLoadException.png" style="width: 368px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/837782i5AB4A71E21FD4DF8/image-size/large?v=v2&amp;amp;px=999" role="button" title="TypeLoadException.png" alt="TypeLoadException.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Oct 2020 23:50:07 GMT</pubDate>
    <dc:creator>lionel.kai</dc:creator>
    <dc:date>2020-10-28T23:50:07Z</dc:date>
    <item>
      <title>TypeLoadException for Hello Ribbon</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9831314#M30797</link>
      <description>&lt;P&gt;I've been searching for a basic "Hello Ribbon" tutorial that creates a simple button on a new Ribbon tab, but haven't yet found one. I was recently pointed to:&lt;/P&gt;&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/files/revit_2014_api_developer_guide.pdf" target="_blank"&gt;https://thebuildingcoder.typepad.com/files/revit_2014_api_developer_guide.pdf &lt;/A&gt;&lt;/P&gt;&lt;P&gt;which has a decently basic one on page 18. It did require a separate "Hello World", but that was easy enough. My problem with this one is the attached error when it tries to load in Revit. This page:&lt;/P&gt;&lt;P&gt;&lt;A href="https://adndevblog.typepad.com/aec/2013/03/systemtypeloadexception-with-revit-add-in.html" target="_blank"&gt;https://adndevblog.typepad.com/aec/2013/03/systemtypeloadexception-with-revit-add-in.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;seems to indicate it's something related to actually finding the dll, the namespace, and/or the .NET version. I've tried various things, and am using 4.6 (for Revit 2018) as far as I can tell, but still get the error. I've attached my VisualStudio solutions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the larger scheme of things I'd like to have a self-contained example (that produces ONE .dll to deploy), so that I can scale it up later, but at this point I'd settle for getting anything to work properly (other examples I've tried recently or over the years have resulted in a panel but no button, or other weirdness).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TypeLoadException.png" style="width: 368px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/837782i5AB4A71E21FD4DF8/image-size/large?v=v2&amp;amp;px=999" role="button" title="TypeLoadException.png" alt="TypeLoadException.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 23:50:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9831314#M30797</guid>
      <dc:creator>lionel.kai</dc:creator>
      <dc:date>2020-10-28T23:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: TypeLoadException for Hello Ribbon</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9831643#M30798</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1865279"&gt;@lionel.kai&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Try using this below link&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/revit-cannot-run-external-application/td-p/8192140" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/revit-api-forum/revit-cannot-run-external-application/td-p/8192140&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this doesn't help could you please show us your .addin manifest file?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 06:44:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9831643#M30798</guid>
      <dc:creator>naveen.kumar.t</dc:creator>
      <dc:date>2020-10-29T06:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: TypeLoadException for Hello Ribbon</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9833328#M30799</link>
      <description>&lt;P&gt;I think my .addin file looks ok (was in the solution .zip, but I've attached it again as well - had to put it in a .zip to upload anyway).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The thread you linked to also mentioned an issue with referencing a .dll (though the Building Coder link doesn't seem to have anything to do with that), so I put the Hello World code in the AddPanel .cs file so that it would be in one .dll (which is what I originally wanted anyway), but I'm not sure if I need separate entries in the .addin file for each command being referenced by a button? And I'd probably want to add buttons that trigger commands in other people's .dll's, so I'd want it to work either way, but &lt;STRONG&gt;in any case I got the same result&lt;/STRONG&gt; (the modified .cs is also in the new .zip). &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 20:59:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9833328#M30799</guid>
      <dc:creator>lionel.kai</dc:creator>
      <dc:date>2020-10-29T20:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: TypeLoadException for Hello Ribbon</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9834054#M30800</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1865279"&gt;@lionel.kai&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;Your code works fine and also I think I figured out what is causing the problem in your project!&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In your addin file, the Full class name is wrong&lt;/P&gt;
&lt;P&gt;You used "P" instead of "p"&lt;/P&gt;
&lt;P&gt;So change&lt;/P&gt;
&lt;P&gt;&amp;lt;FullClassName&amp;gt;AddPanel.CsAdd&lt;EM&gt;&lt;STRONG&gt;P&lt;/STRONG&gt;&lt;/EM&gt;anel&amp;lt;/FullClassName&amp;gt;&lt;/P&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;P&gt;&amp;lt;FullClassName&amp;gt;AddPanel.CsAdd&lt;EM&gt;&lt;STRONG&gt;p&lt;/STRONG&gt;&lt;/EM&gt;anel&amp;lt;/FullClassName&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 07:14:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9834054#M30800</guid>
      <dc:creator>naveen.kumar.t</dc:creator>
      <dc:date>2020-10-30T07:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: TypeLoadException for Hello Ribbon</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9835988#M30801</link>
      <description>&lt;P&gt;AHHHH! It figures it was something dumb like that... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I renamed the Class instead (to "P"), and that fixed the above error, but now I get a different one (below). A panel appears on the Add-Ins tab, but no button...&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArgumentException.png" style="width: 453px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/838604i660C5B8392B6F632/image-size/large?v=v2&amp;amp;px=999" role="button" title="ArgumentException.png" alt="ArgumentException.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 22:55:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9835988#M30801</guid>
      <dc:creator>lionel.kai</dc:creator>
      <dc:date>2020-10-30T22:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: TypeLoadException for Hello Ribbon</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9839246#M30802</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1865279"&gt;@lionel.kai&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;In your code&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;new PushButtonData("HelloWorld", "HelloWorld", @"AddPanel.dll", "AddPanel.CsHelloWorld")&lt;/LI-CODE&gt;
&lt;P&gt;add the full path of your AddPanel.dll file.&lt;/P&gt;
&lt;P&gt;For example&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;new PushButtonData("HelloWorld", "HelloWorld", @"C:\Users\MyRevitPlugin\AddPanel\AddPanel.dll", "AddPanel.CsHelloWorld")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 07:32:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9839246#M30802</guid>
      <dc:creator>naveen.kumar.t</dc:creator>
      <dc:date>2020-11-02T07:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: TypeLoadException for Hello Ribbon</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9840423#M30803</link>
      <description>&lt;P&gt;Instead of hardcoding the path, I strongly recommend that you use&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;System.Reflection.Assembly.GetExecutingAssembly().Location&lt;/LI-CODE&gt;&lt;P&gt;to get the path of the currently running dll (i.e. your plugin).&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 16:23:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9840423#M30803</guid>
      <dc:creator>mhannonQ65N2</dc:creator>
      <dc:date>2020-11-02T16:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: TypeLoadException for Hello Ribbon</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9840714#M30804</link>
      <description>&lt;P&gt;Woo-hoo!&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5661631"&gt;@naveen.kumar.t&lt;/a&gt;&amp;nbsp;After fixing that path, I got a similar error for the Uri - but that was just as easily fixed by putting the full path there as well. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8377999"&gt;@mhannonQ65N2&lt;/a&gt;&amp;nbsp;Thanks for the tip! I found something similar in one of the other "simple" tutorials that I couldn't get to run, so I modified it to something a little more useful for the icon:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;var iconPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
Uri uriImage = new Uri(System.IO.Path.Combine(iconPath, "LACMA DOORS.png"));&lt;/LI-CODE&gt;&lt;P&gt;Along the way, I even figured out what the&amp;nbsp;@ was for, LOL! Now I just need to figure out how to put it on a new tab. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 18:21:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/typeloadexception-for-hello-ribbon/m-p/9840714#M30804</guid>
      <dc:creator>lionel.kai</dc:creator>
      <dc:date>2020-11-02T18:21:29Z</dc:date>
    </item>
  </channel>
</rss>

