<?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: Problem Debugging AutoCAD Plugin with Visual Studio: Assembly Loaded from Temp Folde in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/problem-debugging-autocad-plugin-with-visual-studio-assembly/m-p/12640850#M5022</link>
    <description>&lt;P&gt;Just NETLOAD the dll from the debug folder. Personally, I use my partial menu's mnl file to load the dll on startup.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Mar 2024 15:31:22 GMT</pubDate>
    <dc:creator>Ed__Jobe</dc:creator>
    <dc:date>2024-03-14T15:31:22Z</dc:date>
    <item>
      <title>Problem Debugging AutoCAD Plugin with Visual Studio: Assembly Loaded from Temp Folde</title>
      <link>https://forums.autodesk.com/t5/net-forum/problem-debugging-autocad-plugin-with-visual-studio-assembly/m-p/12640564#M5021</link>
      <description>&lt;P&gt;I'm facing a challenge developing a plugin for AutoCAD and would like to ask for your help or insights.&lt;/P&gt;&lt;P&gt;I recently started working on a plugin for AutoCAD using Visual Studio. The project compiles without problems, and the .pdb file for debugging is generated correctly in the C:\Users\User\source\repos\CivilPset\CivilPset\bin\x64\Debug folder. However, when I try to debug the plugin in AutoCAD using the AddIn Manager, I am encountering a peculiar situation: Visual Studio is not loading the assembly from the Debug folder as expected. Instead, the plugin is loaded from a temporary folder (C:\Users\User\AppData\Local\Temp\AcadAddins...), and this has prevented breakpoints from being hit during debugging. The error message displayed by Visual Studio is "Binary was not built with debug information."&lt;/P&gt;&lt;P&gt;Here are some points I checked:&lt;/P&gt;&lt;P&gt;The plugin is compiled in Debug mode, and the .pdb file is present in the project's output folder.&lt;BR /&gt;The project settings in Visual Studio appear to be correct, including the options for generating debug information.&lt;BR /&gt;I tried manually copying the DLL and PDB file to the mentioned temporary folder, but the problem persists.&lt;BR /&gt;This behavior is puzzling, especially because Visual Studio and AddIn Manager appear to be redirecting execution to a temporary folder rather than using the project output folder where the debug files reside. This results in the inability to reach breakpoints and effectively debug the code.&lt;/P&gt;&lt;P&gt;I would like to know if anyone has faced a similar situation or has suggestions on how to resolve this issue. Is there a specific setting in Visual Studio, AutoCAD, or the plugin loading process that I may have missed? Any help or direction would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thank you in advance for your assistance and time.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 13:53:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/problem-debugging-autocad-plugin-with-visual-studio-assembly/m-p/12640564#M5021</guid>
      <dc:creator>b0166408</dc:creator>
      <dc:date>2024-03-14T13:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Debugging AutoCAD Plugin with Visual Studio: Assembly Loaded from Temp Folde</title>
      <link>https://forums.autodesk.com/t5/net-forum/problem-debugging-autocad-plugin-with-visual-studio-assembly/m-p/12640850#M5022</link>
      <description>&lt;P&gt;Just NETLOAD the dll from the debug folder. Personally, I use my partial menu's mnl file to load the dll on startup.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 15:31:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/problem-debugging-autocad-plugin-with-visual-studio-assembly/m-p/12640850#M5022</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2024-03-14T15:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Debugging AutoCAD Plugin with Visual Studio: Assembly Loaded from Temp Folde</title>
      <link>https://forums.autodesk.com/t5/net-forum/problem-debugging-autocad-plugin-with-visual-studio-assembly/m-p/12640955#M5023</link>
      <description>&lt;P&gt;I use Autoloader, as I can not only build right to the app's .bundle folder, but the PackageContents.xml file allows me to also easily add custom sysvars, etc as needed in one place - it also makes it easy to use in-house or for publishing apps to Autodesk Exchange.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 16:11:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/problem-debugging-autocad-plugin-with-visual-studio-assembly/m-p/12640955#M5023</guid>
      <dc:creator>BlackBox_</dc:creator>
      <dc:date>2024-03-14T16:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Debugging AutoCAD Plugin with Visual Studio: Assembly Loaded from Temp Folde</title>
      <link>https://forums.autodesk.com/t5/net-forum/problem-debugging-autocad-plugin-with-visual-studio-assembly/m-p/12640977#M5024</link>
      <description>&lt;P&gt;&lt;SPAN&gt;But, if I NETLOAD, i can't build without close Civil 3D. Thats why i am trying using Addimaeger&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 16:24:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/problem-debugging-autocad-plugin-with-visual-studio-assembly/m-p/12640977#M5024</guid>
      <dc:creator>b0166408</dc:creator>
      <dc:date>2024-03-14T16:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Debugging AutoCAD Plugin with Visual Studio: Assembly Loaded from Temp Folde</title>
      <link>https://forums.autodesk.com/t5/net-forum/problem-debugging-autocad-plugin-with-visual-studio-assembly/m-p/12641013#M5025</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14564055"&gt;@b0166408&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;But, if I NETLOAD, i can't build without close Civil 3D. Thats why i am trying using Addimaeger&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since you can't "unload" a dll, you have to restart AutoCAD each time you update your code and start a new debugging session. The best you can do is automatically netload your dll. &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1206685"&gt;@BlackBox_&lt;/a&gt; mentioned Autoloading, that works the same way. I have my own system that I developed before autoloader technology arrived, so I just use an mnl. You could also use acad.lsp. If you want to debug with a specific dwg, you can change your VS project to include the file path to your dwg in the startup &lt;A href="https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-8E54B6EC-5B52-4F62-B7FC-0D4E1EDF093A" target="_blank" rel="noopener"&gt;command line switch&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also check Hot Reload to avoid reloading the dll each time.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="acad Project Debug settings.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1337208i867B7C2D6A4F2F1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="acad Project Debug settings.png" alt="acad Project Debug settings.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 16:53:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/problem-debugging-autocad-plugin-with-visual-studio-assembly/m-p/12641013#M5025</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2024-03-14T16:53:12Z</dc:date>
    </item>
  </channel>
</rss>

