我對 Azure 應用服務非常陌生,但已開始在我的學期專案中使用它。使用 Github Actions,它會自動部署和構建在 Azure 上,并準備好供我測驗和分享。我確實在找到我所有的 repo 檔案時遇到了一個小問題。我希望我可以在 Azure 上使用我在 Visual Studio 2019 中使用的相同相對路徑。但我似乎無法弄清楚我的影像跑到哪里去了。我有一個檔案夾,其中包含要在益智游戲中使用的影像片段。位于“游戲檔案”檔案夾中。

Top picture is of my folder structure in VS2019 and the bottom picture is of the folder structure in Azure App Service Editor. Do I need to use another Azure service to get all my files on there, or do I need to do something from Githubs side of things. Tried searching, but couldn't find anything that answer my question.. Any tips are greatly appriciated!
uj5u.com熱心網友回復:
在您的project_name.csproj檔案中添加以下代碼。
<ItemGroup>
<Content Include="gamefiles\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
它應該對你有用。
測驗步驟



轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/351486.html
標籤:c# azure visual-studio asp.net-core azure-web-app-service
