如何访问从Visual Studio部署到Azure的所有文件?我正在使用发布的bot框架创建一个bot。但是,当我去在线检查代码时,无法通过App Service Editor / Kudu / etc查看所有文件。无法找到导航站点目录的文件。
有人知道吗?
答案 0 :(得分:7)
您可以使用网址格式
进入网站的"Kudu"
仪表板
for (n in locs) { print $1,locs[n]}
这将为您提供基于Web的仪表板,包括调试控制台(基于Web),您可以在其中浏览各种目录
或
在Visual Studio中的窗口 http://<yoursitename>.scm.azurewebsites.net
中,单击并连接“ Azure”。
"Server Explorer"
在这里您可以看到所有文件,并且可以直接在Visual Studio中编辑它们。
答案 1 :(得分:2)
Web应用程序发布时通常不包含源代码。网站项目,另一方面。可以在这里找到更多信息:https://msdn.microsoft.com/en-us/library/dd547590(v=vs.110).aspx#Anchor_1
如果要在发布过程中包括源代码,可以使用后期部署脚本来完成:
在.csproj中:
<Import Project="PostDeployScripts\IncludeSources.targets" Condition="Exists('PostDeployScripts\IncludeSources.targets')" />
IncludeSources.targets:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CoreCompileDependsOn>$(CoreCompileDependsOn);IncludeSource</CoreCompileDependsOn>
</PropertyGroup>
<Target Name="IncludeSource">
<ItemGroup>
<Content Include="**\*.cs" />
<Content Include="**\*.csproj" />
<Content Include="PostDeployScripts\*.*" />
</ItemGroup>
</Target>
</Project>