Visual Studio doesn't see all files in System32


New Member
I set some post-build commands in Visual Studio 2017 that should allow me to run a program that I currently have in System32 (wsl.exe). However, Visual Studio doesn't see the program.

I tried to set the command to dir C:\Windows\System32\ to see all the files it could list, and in fact it doesn't list over a 1'000 files out of the around 4'600 files I have there, including the wsl.exe file I'm trying to run. The number of files show up correctly when running the same command in the command prompt.

I've tried to run whoami as the post-build command, and it returns the same user as if I run the same command in the command prompt.

Am I missing something?


Thành viên BQT
Visual Studio itself is 32-bit application. As such, the OS shims the application behavior to a different view of the Windows and System32 folders. i.e c:\Windows\System32 in the application is actually the c:\Windows\SysWow64 folder for 32-bit apps. That explains why it can't see the wsl.exe binary... Not sure what the workaround is... looking into this...

Từ khóa phổ biến

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.