Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error: The command powershell exited with code 9009. #223

Closed
KulaGGin opened this issue May 2, 2022 · 2 comments
Closed

Build error: The command powershell exited with code 9009. #223

KulaGGin opened this issue May 2, 2022 · 2 comments

Comments

@KulaGGin
Copy link

KulaGGin commented May 2, 2022

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.

@KN4CK3R
Copy link
Member

KN4CK3R commented May 2, 2022

Does powershell work in an old cmd window?
grafik

My search engine tells me that 9009 means not found.

@KulaGGin
Copy link
Author

KulaGGin commented May 2, 2022

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.

@KulaGGin KulaGGin closed this as completed May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants