×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Programming in Visual Studio and Attaching to ugraf.exe

Programming in Visual Studio and Attaching to ugraf.exe

Programming in Visual Studio and Attaching to ugraf.exe

(OP)
I typically program within visual studio vb.net and during development of an application I am building an application and then attaching it to the process of nx (ugraf.exe). Typically, this works fine but for some reason now, I cannont attache to the process after I have attached to the process and my program crashes and I try to re=attach again. I keep getting the following error::

Error 17 Could not copy "obj\Debug\iRotorForging.dll" to "bin\Debug\iRotorForging.dll". Exceeded retry count of 10. Failed. iRotorForging

It's like NX still has a hold of the DLL and is not letting it go.

RE: Programming in Visual Studio and Attaching to ugraf.exe

If your program crashes, then it's quite likely that your GetUnloadOption function is not being executed. If that is the case, then NX does indeed still have hold of your DLL, as you suspected. That's why the copy operation can't replace the DLL.

RE: Programming in Visual Studio and Attaching to ugraf.exe

This is just a workaround: Try deleting the obj folder created under application directory before building...
If it works write a "Pre-build event command line" in visual studio for deleting this folder.

Thanks,
Prasanna M

RE: Programming in Visual Studio and Attaching to ugraf.exe

What GetUnloadOption did you use for the compiled .dll? If you are using an option other than Immediately, then yes, NX will hold onto the .dll until NX terminates, or you explicitly unload it.

www.nxjournaling.com

RE: Programming in Visual Studio and Attaching to ugraf.exe

(OP)
Sorry. My mistake. I forgot to add the following subroutine illustrated below at the end of my nxopen function. What other types of these little tricks do people know about that tend to trap us???

CODE -->

Public Function GetUnloadOption(ByVal dummy As String) As Integer
        GetUnloadOption = UFConstants.UF_UNLOAD_IMMEDIATELY
    End Function 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources