<?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 Re: System.TypeLoadException: Could Not Load Type, is the exception I get when Im trying to load my own class libray compiles with Visual Studio in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/system-typeloadexception-could-not-load-type-is-the-exception-i/m-p/11936441#M12279</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13506426"&gt;@eduardooost&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;This does not seem to be a Revit API exception but a .NET one. From afar this looks like referencing mixup to your class library. You could&amp;nbsp;&lt;SPAN&gt;take a closer look at your project references, your web.config file and your .dll versions to make sure that all your references are correct.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Also, take a look at this thread with exact same issue, see if yu could get any insights:&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://stackoverflow.com/questions/124841/could-not-load-type-from-assembly-error" target="_blank" rel="noopener"&gt;https://stackoverflow.com/questions/124841/could-not-load-type-from-assembly-error&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;to solve it&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2023 14:26:02 GMT</pubDate>
    <dc:creator>caroline.gitonga</dc:creator>
    <dc:date>2023-05-02T14:26:02Z</dc:date>
    <item>
      <title>System.TypeLoadException: Could Not Load Type, is the exception I get when Im trying to load my own class libray compiles with Visual Studio</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/system-typeloadexception-could-not-load-type-is-the-exception-i/m-p/11936375#M12278</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="System.TypeLoadException_CouldNoTLoadType.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1209538iD9A5539F533E7A39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="System.TypeLoadException_CouldNoTLoadType.png" alt="System.TypeLoadException_CouldNoTLoadType.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Im getting this error message when executing an external command that references a class library that I compiled using Visual Studio and .NETframework 4.8.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That class library itself was compiled&amp;nbsp;using Visual Studio and .NETframework 4.8, and works fine when I execute it. Next I'll share an image of the working script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="System.TypeLoadException_CouldNoTLoadType_Script-to-be-loaded.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1209563i5AD6E8A237DC1840/image-size/medium?v=v2&amp;amp;px=400" role="button" title="System.TypeLoadException_CouldNoTLoadType_Script-to-be-loaded.png" alt="System.TypeLoadException_CouldNoTLoadType_Script-to-be-loaded.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;But when I reference this library into another project, I get this message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;System.TypeLoadException: Could not load type 'BIMIQS_modeling_from_autocad_drawing.BIMIQs_default_generic_variables' from assembly 'BIMIQS_modeling_from_autocad_drawing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null', at Test.Main.Execute...&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does somebody knows how to fix this problem? Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 14:08:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/system-typeloadexception-could-not-load-type-is-the-exception-i/m-p/11936375#M12278</guid>
      <dc:creator>eduardooost</dc:creator>
      <dc:date>2023-05-02T14:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: System.TypeLoadException: Could Not Load Type, is the exception I get when Im trying to load my own class libray compiles with Visual Studio</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/system-typeloadexception-could-not-load-type-is-the-exception-i/m-p/11936441#M12279</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13506426"&gt;@eduardooost&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;This does not seem to be a Revit API exception but a .NET one. From afar this looks like referencing mixup to your class library. You could&amp;nbsp;&lt;SPAN&gt;take a closer look at your project references, your web.config file and your .dll versions to make sure that all your references are correct.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Also, take a look at this thread with exact same issue, see if yu could get any insights:&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://stackoverflow.com/questions/124841/could-not-load-type-from-assembly-error" target="_blank" rel="noopener"&gt;https://stackoverflow.com/questions/124841/could-not-load-type-from-assembly-error&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;to solve it&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 14:26:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/system-typeloadexception-could-not-load-type-is-the-exception-i/m-p/11936441#M12279</guid>
      <dc:creator>caroline.gitonga</dc:creator>
      <dc:date>2023-05-02T14:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: System.TypeLoadException: Could Not Load Type, is the exception I get when Im trying to load my own class libray compiles with Visual Studio</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/system-typeloadexception-could-not-load-type-is-the-exception-i/m-p/11938522#M12280</link>
      <description>&lt;P&gt;Thank you so much Caroline. Your response was very helpful. It helped me to see that the problem was in the connection between the class libraries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that the problem was the compiling architecture of the class library and of the script that referenced it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I canged the build platform to x64 in all build configurations on both scripts and it was able to load the first class library.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 11:50:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/system-typeloadexception-could-not-load-type-is-the-exception-i/m-p/11938522#M12280</guid>
      <dc:creator>eduardooost</dc:creator>
      <dc:date>2023-05-03T11:50:29Z</dc:date>
    </item>
  </channel>
</rss>

