<?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: AutoCAD 2020 removed useLegacyV2RuntimeActivationPolicy in acad.exe.config in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/autocad-2020-removed-uselegacyv2runtimeactivationpolicy-in-acad/m-p/9251348#M20473</link>
    <description>&lt;P&gt;Thank you very much for your help and clarification.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately we don't have the code for the affected assemblies. But maybe we can obtain an updated version from the respective distributors. As long as this process runs we have to use the legacy policy in acad.exe.config.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you once more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jan 2020 06:29:23 GMT</pubDate>
    <dc:creator>hierholzer</dc:creator>
    <dc:date>2020-01-15T06:29:23Z</dc:date>
    <item>
      <title>AutoCAD 2020 removed useLegacyV2RuntimeActivationPolicy in acad.exe.config</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-2020-removed-uselegacyv2runtimeactivationpolicy-in-acad/m-p/9249271#M20471</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I noticed an System.TypeInitializationException in one of our dlls from our AutoCAD extension.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The error message is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TypeInitializationException: The type initializer for 'xxx' threw an exception. Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I found out that the entry&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;startup useLegacyV2RuntimeActivationPolicy="true"&amp;gt;&lt;BR /&gt;&amp;lt;supportedRuntime version="v4.0"/&amp;gt;&lt;BR /&gt;&amp;lt;/startup&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;in the acad.exe.config file has been removed with AutoCAD 2020. If I add these lines again into the acad.exe.config I get no error message and everything works like before.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What is the reason that this has been removed?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can I add this entry again without causing problems?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Alex&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2020 12:09:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-2020-removed-uselegacyv2runtimeactivationpolicy-in-acad/m-p/9249271#M20471</guid>
      <dc:creator>hierholzer</dc:creator>
      <dc:date>2020-01-14T12:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD 2020 removed useLegacyV2RuntimeActivationPolicy in acad.exe.config</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-2020-removed-uselegacyv2runtimeactivationpolicy-in-acad/m-p/9249757#M20472</link>
      <description>&lt;P&gt;The reason of that &amp;lt;startup useLegacy.... /&amp;gt; being removed is the latest versions of AutoCAD .NET API are all built on .NET Framework 4.xx, which implement different code activation policies, especially the code execution security policy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your DLL is quite old (built on .NET 2.xx) and requires to use legacy policy, then you need to add that into acad.exe.config (as you already did and it worked). But you need to be aware, it might compromise AutoCAD security. In spite of the saying of "if it is not broken, do not fix it", possible security breach itself is considered "broken". So, you may want to rebuild the DLL with AutoCAD matching .NET framework (4.xx), if you have the code.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2020 15:17:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-2020-removed-uselegacyv2runtimeactivationpolicy-in-acad/m-p/9249757#M20472</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2020-01-14T15:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD 2020 removed useLegacyV2RuntimeActivationPolicy in acad.exe.config</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-2020-removed-uselegacyv2runtimeactivationpolicy-in-acad/m-p/9251348#M20473</link>
      <description>&lt;P&gt;Thank you very much for your help and clarification.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately we don't have the code for the affected assemblies. But maybe we can obtain an updated version from the respective distributors. As long as this process runs we have to use the legacy policy in acad.exe.config.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you once more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 06:29:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-2020-removed-uselegacyv2runtimeactivationpolicy-in-acad/m-p/9251348#M20473</guid>
      <dc:creator>hierholzer</dc:creator>
      <dc:date>2020-01-15T06:29:23Z</dc:date>
    </item>
  </channel>
</rss>

