AeroAutomation
Mechanical
- Jul 18, 2020
- 2
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" which in hindsight is probably a very confusing name. sorry....
is there a way to get NX to release the .exe file and all the relevant dll files so I don't have to close NX every time I want to recompile?
my visual studio solution only consists of a single project which compiles into an exe file. I would like to eventually break up my code into several dll files + 1 main exe file for code organization reasons.
here is the exact error message from Visual Studio 2019:
1>------ Rebuild All started: Project: NX, Configuration: Debug x64 ------
1>warning MSB3061: Unable to delete file "C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NX.exe". The process cannot access the file 'C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NX.exe' because it is [highlight #FCE94F]being used by another process[/highlight].
1>warning MSB3061: Unable to delete file "C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NXOpen.dll". Access to the path 'C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NXOpen.dll' is denied.
1>warning MSB3061: Unable to delete file "C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NXOpen.Utilities.dll". Access to the path 'C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NXOpen.Utilities.dll' is denied.
1>warning MSB3061: Unable to delete file "C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NXOpenUI.dll". Access to the path 'C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NXOpenUI.dll' is denied.
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 1 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. [highlight #FCE94F]The file is locked by: "NX 12 (12208)"[/highlight]
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 2 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 3 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 4 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 5 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 6 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 7 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 8 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 9 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 10 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>error MSB3027: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Exceeded retry count of 10. Failed. The file is locked by: "NX 12 (12208)"
1>error MSB3021: Unable to copy file "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
note: I called my exe file "NX.exe" which in hindsight is probably a very confusing name. sorry....
is there a way to get NX to release the .exe file and all the relevant dll files so I don't have to close NX every time I want to recompile?
my visual studio solution only consists of a single project which compiles into an exe file. I would like to eventually break up my code into several dll files + 1 main exe file for code organization reasons.
here is the exact error message from Visual Studio 2019:
1>------ Rebuild All started: Project: NX, Configuration: Debug x64 ------
1>warning MSB3061: Unable to delete file "C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NX.exe". The process cannot access the file 'C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NX.exe' because it is [highlight #FCE94F]being used by another process[/highlight].
1>warning MSB3061: Unable to delete file "C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NXOpen.dll". Access to the path 'C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NXOpen.dll' is denied.
1>warning MSB3061: Unable to delete file "C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NXOpen.Utilities.dll". Access to the path 'C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NXOpen.Utilities.dll' is denied.
1>warning MSB3061: Unable to delete file "C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NXOpenUI.dll". Access to the path 'C:\Users\Me\source\repos\NX\NX\bin\x64\Debug\NXOpenUI.dll' is denied.
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 1 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. [highlight #FCE94F]The file is locked by: "NX 12 (12208)"[/highlight]
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 2 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 3 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 4 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 5 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 6 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 7 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 8 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 9 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>warning MSB3026: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Beginning retry 10 in 1000ms. The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process. The file is locked by: "NX 12 (12208)"
1>error MSB3027: Could not copy "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". Exceeded retry count of 10. Failed. The file is locked by: "NX 12 (12208)"
1>error MSB3021: Unable to copy file "obj\x64\Debug\NX.exe" to "bin\x64\Debug\NX.exe". The process cannot access the file 'bin\x64\Debug\NX.exe' because it is being used by another process.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========