ReClassNET/ReClass.NET

Build error: The command powershell exited with code 9009.

KulaGGin opened this issue · 2 comments

When trying to build in Batch mode in Release configuration projects NativeCore x86 and x64, Reclass.NET x86 and x64 and Reclass.NET_Launcher, I get this error:

Severity Code Description File Line Suppression State
Error The command "powershell -Command "((Get-Date).ToUniversalTime()).ToString("yyyy/MM/dd HH:mm:ss") | Out-File 'D:\Projects\Reversing\ReClass.NET\ReClass.NET\Resources\BuildDate.txt'"
" exited with code 9009.

devenv_LruxAqJmI8

When I remove the pre-build powershell command from the pre-build events, I start to get this error:

Severity Code Description File Line Suppression State
Error Invalid Resx file. Could not find file 'D:\Projects\Reversing\ReClass.NET\ReClass.NET\Resources\BuildDate.txt'. Line 381, position 5. D:\Projects\Reversing\ReClass.NET\ReClass.NET\Properties\Resources.resx 381

devenv_DFNTMGT09R

After I manually create empty BuildDate.txt file at the specified path, the solution seems to start to build correctly and I can start the program. Don't know if it will function correctly.

If I manually add the BuildDate.txt file and restore the powershell command, I still get the 9009 error when trying to build.

Powershell is functional:
powershell_HDQ0VX9cw8

Windows 10, Visual Studio 2019 and this problem occurs on the last commit of the master branch at the time of writing.

Does powershell work in an old cmd window?
grafik

My search engine tells me that 9009 means not found.

Thanks. I was missing the path to the folder that has powershell in the Path environment variable. I tried launching the powershell's command line, it worked and I tried running powershell script from inside Visual Studio but I haven't tried running powershell from the command line before creating the issue.

After I added the folder to the Path environment varialble and restarted Visual Studio, the solution started to build with the powershell script.