簡體   English   中英

AWS beanstalk 無法執行 powershell 腳本

[英]AWS beanstalk not able to execute powershell script

我正在嘗試在 aws beanstalk 上部署我的 .net core (2.0.0) 應用程序。 根據 aws 指南( https://aws.amazon.com/blogs/developer/aws-and-net-core-2-0/ ),我在部署清單中添加了 powershell 腳本文件和腳本文件的位置。 但是當我部署我的應用程序時,我收到此錯誤:

運行命令的錯誤消息:C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy unrestricted -NonInteractive -NoProfile -Command "& { & \\"C:\\staging./Scripts/installnetcore20.ps1"; exit $LastExitCode }" & :術語 '"C:\\staging./Scripts/installnetcore20.ps1"' 未被識別為 cmdlet、函數、腳本文件或可運行程序的名稱。

我還嘗試更改我的清單文件中的各種路徑組合,例如給出絕對路徑、在路徑前加上點等等。

對此的任何幫助表示贊賞。

beanstalk AMI 已更新為預安裝的 .NET Core 2.0,因此您不再需要運行此 powershell 腳本。 這是該公告。

https://aws.amazon.com/blogs/developer/aws-elastic-beanstalk-updated-with-net-core-2-0/

我猜你的問題是腳本文件沒有在項目文件中標記為要復制到輸出文件夾的內容文件。 那么它們就不會包含在發布包中。

Before
'"C:\staging./Scripts/installnetcore20.ps1"'
After
'"C:\staging/Scripts/installnetcore20.ps1"'

分期后刪除點 ? 看在上帝的份上,讓你的斜線都以同樣的方式進行嗎? 它讓我的臉抽搐。 (雖然我很確定 Windows 可以處理這個問題)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM