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

Cannot build on a machine with powershell 7 #2078

Closed
DinoChiesa opened this issue Mar 24, 2023 · 2 comments
Closed

Cannot build on a machine with powershell 7 #2078

DinoChiesa opened this issue Mar 24, 2023 · 2 comments
Labels
Type: Bug Something isn't working

Comments

@DinoChiesa
Copy link

Describe the bug

The build command presumes that a back-version of powershell is installed. If only powershell 7 is available, the build will fail.

To Reproduce

On a machine that has only powershell 7 installed, run .\eng\common\build.ps1 -restore -build.

PS C:\Users\xyz\dev\dotnet\yarp-reverse-proxy> $PSVersionTable.PSVersion

Major  Minor  Patch  PreReleaseLabel BuildLabel
-----  -----  -----  --------------- ----------
7      3      3

PS C:\Users\xyz\dev\dotnet\yarp-reverse-proxy> .\eng\common\build.ps1 -restore -build
  Determining projects to restore...
  All projects are up-to-date for restore.
'powershell' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\xyz\.nuget\packages\microsoft.dotnet.arcade.sdk\7.0.0-beta.22426.8\tools\InstallDotNetCore.targets(15,5): error : dotnet-install failed [C:\Users\dpchi\.nuget\packages\microsoft.dotnet.ar
cade.sdk\7.0.0-beta.22426.8\tools\Tools.proj]
'powershell' is not recognized as an internal or external command,
operable program or batch file.

Further technical details

  • powershell 7
  • Windows 10
  • current main of reverse-proxy
  • SDK 7.0.104
@DinoChiesa DinoChiesa added the Type: Bug Something isn't working label Mar 24, 2023
@MihaZupan
Copy link
Member

Is powershell available on your PATH? If not, can you try adding it (likely %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\)?

@samsp-msft
Copy link
Member

Closing due to no-response. Please follow @MihaZupan 's instructions and reactivate if its still an problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants