<?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 Cannot delete .net dll used by Autocad in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/cannot-delete-net-dll-used-by-autocad/m-p/5911878#M37891</link>
    <description>&lt;P&gt;Howdy folks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use a specific autocad dll that I copy into a desired directory, use the dll to do my work and then quit autocad. I then ask c# to delete the dll file that was used in Autocad. However, action is denied saying that file is in use with another process. I have already shut down autocad before trying to delete the file so I really dont know what to do. Other files created in the same folder delete fine. Any suggestions?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2015 14:56:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-11-17T14:56:53Z</dc:date>
    <item>
      <title>Cannot delete .net dll used by Autocad</title>
      <link>https://forums.autodesk.com/t5/net-forum/cannot-delete-net-dll-used-by-autocad/m-p/5911878#M37891</link>
      <description>&lt;P&gt;Howdy folks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use a specific autocad dll that I copy into a desired directory, use the dll to do my work and then quit autocad. I then ask c# to delete the dll file that was used in Autocad. However, action is denied saying that file is in use with another process. I have already shut down autocad before trying to delete the file so I really dont know what to do. Other files created in the same folder delete fine. Any suggestions?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 14:56:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/cannot-delete-net-dll-used-by-autocad/m-p/5911878#M37891</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-17T14:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot delete .net dll used by Autocad</title>
      <link>https://forums.autodesk.com/t5/net-forum/cannot-delete-net-dll-used-by-autocad/m-p/5912053#M37892</link>
      <description>&lt;P&gt;Can you explain this part? &amp;gt;&amp;gt;&lt;SPAN&gt;&amp;nbsp;I then ask c# to delete the dll file&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 16:06:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/cannot-delete-net-dll-used-by-autocad/m-p/5912053#M37892</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2015-11-17T16:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot delete .net dll used by Autocad</title>
      <link>https://forums.autodesk.com/t5/net-forum/cannot-delete-net-dll-used-by-autocad/m-p/5912136#M37893</link>
      <description>I create a file info for the required path and then use delete routine in fileinfo class to delete the dll.</description>
      <pubDate>Tue, 17 Nov 2015 16:46:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/cannot-delete-net-dll-used-by-autocad/m-p/5912136#M37893</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-17T16:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot delete .net dll used by Autocad</title>
      <link>https://forums.autodesk.com/t5/net-forum/cannot-delete-net-dll-used-by-autocad/m-p/5912195#M37894</link>
      <description>&lt;P&gt;That means you are trying to delete a dll that is running. &amp;nbsp;If it's running it belongs to the operating system.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you need a plan b here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: have you checked in Task Manager?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:11:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/cannot-delete-net-dll-used-by-autocad/m-p/5912195#M37894</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2015-11-17T17:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot delete .net dll used by Autocad</title>
      <link>https://forums.autodesk.com/t5/net-forum/cannot-delete-net-dll-used-by-autocad/m-p/5912260#M37895</link>
      <description>&lt;P&gt;As you know, the code that deletes the dll must not run inside of autocad since you have to delete the dll once autocad shuts down.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you probably need to do is wait for the autocad process to fully finish and then add a small wait timer before you delete the dll to make sure that autocad is completely released the dll. &amp;nbsp;I have noticed that there is a few second delay between shutting down autocad and it releasing dlls.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:38:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/cannot-delete-net-dll-used-by-autocad/m-p/5912260#M37895</guid>
      <dc:creator>Keith.Brown</dc:creator>
      <dc:date>2015-11-17T17:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot delete .net dll used by Autocad</title>
      <link>https://forums.autodesk.com/t5/net-forum/cannot-delete-net-dll-used-by-autocad/m-p/5913091#M37896</link>
      <description>&lt;P&gt;You also may consider to not load the dll from file but from memory like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. dllStream.Read(dllContent, ...&lt;/P&gt;&lt;P&gt;2. importAssembly = Assembly.Load(dllContent);&lt;/P&gt;&lt;P&gt;3. ImportType = importAssembly.GetType(typeName); //Namespace.Class&lt;/P&gt;&lt;P&gt;4. importObj = Activator.CreateInstance((Type)ImportType);&lt;/P&gt;&lt;P&gt;5. ImportType.InvokeMember(MethodeName, bflags | BindingFlags.InvokeMethod, null, importObj, args);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can delete the&amp;nbsp;dll after step 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However you cannot reload the same class again in one session.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2015 07:09:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/cannot-delete-net-dll-used-by-autocad/m-p/5913091#M37896</guid>
      <dc:creator>SENL1362</dc:creator>
      <dc:date>2015-11-18T07:09:21Z</dc:date>
    </item>
  </channel>
</rss>

