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

Resolves to wrong version of for VS2022 when using 64bit #33

Open
AdamHess opened this issue Mar 23, 2022 · 0 comments
Open

Resolves to wrong version of for VS2022 when using 64bit #33

AdamHess opened this issue Mar 23, 2022 · 0 comments

Comments

@AdamHess
Copy link

The path resolves to the wrong installation and version when version is set to "current" and you're using 64 bit version of VS22

events.js:1740
      throw er; // Unhandled 'error' event
      ^

Error: spawn **C:\WINDOWS\microsoft.net\Framework64\v15.0\msbuild.exe ENOENT**
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)

This is caused by

	frameworkDirectories = getFrameworkDirectories(msbuildDir);

this prioritizes x86 instances of msbuild (and doesn't even check if msbuildir contains msbuild.exe)

In my particular case, the directory does exist C:\Program Files (x86)\MSBuild\15.0\FileTracker (not sure where that got installed vs2019 doesnt exist on my computer)

I propose that BOTH the x86 and x64 paths are checked and which ever has a version that is greater is selected. Finally, if there are two version equal to one another give us an option to select x86 or x64.

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

1 participant