i found the solution in an online PDF. here is the relevant section.
A project based on the Class Library template has another deficiency — it doesn’t include a GetUnloadOption
function. This means that NX won’t know how to “unload” your code after it has finished executing — in some
sense, NX...
I wrote my first simple .exe file using VB.NET using NXOpen and it successfully compiles and runs but after running the .exe file for the first time i cannot modify it and compile it again because the file is "being used by another process" or "locked by NX"
note: I called my exe file "NX.exe"...