.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to unload Application DLL file

5 REPLIES 5
Reply
Message 1 of 6
dhimant.bhensdadia
3696 Views, 5 Replies

How to unload Application DLL file

Hi Friends,

 

Ihave made the .NET application with class library which provide us Application DLL file which will used to do our customization.

 

Once I have loaded my DLL and after that if I make change any thing in the Code and than I rebuilt it, I am getting the following error message:

 

Error    15    Unable to copy file "obj\Release\SemiAuto.dll" to "bin\Release\Test.dll". The process cannot access the file 'bin\Release\Test.dll' because it is being used by another process.   

Error    14    Could not copy "obj\Release\Test.dll" to "bin\Release\Test.dll". Exceeded retry count of 10. Failed.    SemiAuto

 

5 REPLIES 5
Message 2 of 6

There is no way to unload DLL . Once you load the DLL into AutoCAD, it will be locked then by AutoCAD. You have to close AutoCAD to build that again.

 

Regards

Zakir

Message 3 of 6
KRAVITEJA2016
in reply to: mzakiralam

Every time close and open  that's not a best practice right.

Message 4 of 6
fieldguy
in reply to: KRAVITEJA2016

I use the netreload utility provided by artvegas (thanks again!).

 

https://forums.autodesk.com/t5/net/net-reload-utility-for-visual-studio-download-here/m-p/3185104#M2...

Message 5 of 6
dgorsman
in reply to: KRAVITEJA2016

It's not ideal if you use the "hack'n'slash" approach to development i.e. using debugging to figure what code to write next or what logic/program flow to use.

 

It's not that bad if you change to a more structured approach I.e. working out the data structure and program flow first, using good programming practices, Intellisense, etc. to avoid pitfalls.  That way debugging is little more than confirmation of program logic and won't generate a lot of changes.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 6 of 6

@KRAVITEJA2016

You have hit one of the major differences between lisp and .net development.

Yes, its a pain in the but stopping and starting a session for every code edit.

At a minimum, set up a script (.scr file) to load the .net assembly you are testing, and set your startup params in debug to load that script, to avoid the netload command once each session opens.

Do not use autoload reg settings for this, you just want the debug dll load when testing.

script might be:

netload
"C:\Programming\DotNet\myprog\bin\Debug\RB18\myappR18.dll"

 

then command line debug params like:

/nologo /p "<favorite profile...>" /product ACAD /language "en-US" /b "C:\Programming\DotNet\myprog\Load 2018.scr"

 

The idea with .net is you try to get code in order more before debug. For years autodesk has said we would have "edit and continue" but it never happened, and we "git what we git" as is the new autodesk mantra.

Still, I prefer .net to lisp as visual studio is so nice to use, and object structure of .net is next gen.

 

 


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost