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
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
I use the netreload utility provided by artvegas (thanks again!).
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.
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