我正在關注下面的文章以將ASP.NET應用程序部署到Azure虛擬機。 https://www.visualstudio.com/en-us/docs/release/examples/azure/net-to-azure-vm#build未將特定文件複製到artifactstaging目錄
我得到以下錯誤:
##[error]System.Management.Automation.RuntimeException: The term 'C:\temp\ConfigureWebserver.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. ---> System.Management.Automation.RuntimeException: The term 'C:\temp\ConfigureWebserver.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
如果我手動複製ConfigureWebserver.ps1文件中的虛擬機,然後部署構建,那麼它能夠成功部署。
您能澄清一下你的意思嗎?「如果我在VM中手動複製ConfigureWebserver.ps1文件,然後部署構建,那麼它能夠成功部署。」 – Adrian
你確定你沒有忘記在構建步驟之前將文件的「將副本設置爲輸出目錄」屬性設置爲「始終複製」? – baywet