Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access VS code deployed on Azure

How can I access all the files that are deployed from Visual Studio into Azure? I am creating a bot using bot framework which I then publish. But, when I go to review the code online I can't see all the files via the App Service Editor/Kudu/etc. The can't locate the files navigating the site directory.

Does anyone know?

like image 650
botsbotsbotsbots Avatar asked Jun 29 '18 17:06

botsbotsbotsbots


People also ask

How do I use Visual Studio in Azure?

Azure development tools are built in to Visual Studio. Use the same familiar debugger to troubleshoot your code, whether it is running directly on your workstation or in a container. Publish directly to Azure, or set up a CI/CD pipeline to build and deploy your code to the cloud.

How do I deploy to the Azure App Service in Visual Studio?

Create or open an Azure cloud service project in Visual Studio. In Solution Explorer, right-click the project, and, from the context menu, select Convert > Convert to Azure Cloud Service Project. In Solution Explorer, right-click the newly created Azure project, and, from the context menu, select Publish.


2 Answers

You can enter the site's "Kudu" dashboard, using the url format

http://<yoursitename>.scm.azurewebsites.net

This will give you a web-based dashboard, including a debug console (web-based) where you can explore your various directories

or

In Visual Studio, in the window "Server Explorer" you click and connect on "Azure".

=> App Service=> Your site name => Files

Here you see all your files and you can edit them directly in Visual Studio.

like image 162
Sajeetharan Avatar answered Sep 26 '22 21:09

Sajeetharan


Web Applications do not generally have the source code included when published. Web Site projects, on the other hand do. More information can be found here: https://msdn.microsoft.com/en-us/library/dd547590(v=vs.110).aspx#Anchor_1

If you want to include the source code during the publish process, this can be done with a Post Deploy Script:

In the .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>
like image 43
Eric Dahlvang Avatar answered Sep 26 '22 21:09

Eric Dahlvang