locked
ASP.Net Core 2.1.1 Web Deploy Issue RRS feed

  • Question

  • User1567530616 posted

    I am creating a new website with ASP.Net Core 2.1.1.

    The website runs fine locally. Yesterday I did my first attempt at deploying it to Azure. At first the website worked fine on Azure, but when I updated any cshtml file, the website  stopped working. I did some research and found that if I add this line to my csproj file, it would work again (I was getting an error related to framework):

    <RuntimeFrameworkVersion>2.1.1</RuntimeFrameworkVersion>

    So now the website works, but when I make a change and do a fresh web deploy, my changed cshtml, css, etc. files are not updated.

    I changed the deployment settings to delete extra files on Azure and did a preview and web deploy wants to delete almost all of my files on Azure. It does not appear to recognize these files are still part of my project (although they are marked as such). When I do a web deploy without asking it to delete extra files, it will update a few dll, json and web.config files, but nothing that I changed in my cshtml, css, etc. files.

    Any ideas on why web deploy will not update my files and why it instead wants to delete them from Azure?

    Saturday, August 25, 2018 11:51 PM

All replies

  • User283571144 posted

    Hi searchlightadmin,

    Any ideas on why web deploy will not update my files and why it instead wants to delete them from Azure?

    Could you please tell me which service you have used? Web app or Azure VM?

    Could you please tell me how you uoload the file into the web app? Using FTP or web deploy?

    If you could post more details information, it will be more easily for us to reproduce the issue and find the solution.

    Best Regards,

    Brando

    Monday, August 27, 2018 7:12 AM
  • User1567530616 posted

    I am using Web app and I am uploading using web deploy.

    Monday, August 27, 2018 2:10 PM
  • User283571144 posted

    Hi searchlightadmin,

    According to your description, I have created a test demo with asp.net core 2.1 and publish the web application to azure web app, it works well.

    No matter I add new view or add new controller, it could run well.

    I suggest you could try to create a new web application and test again.

    My csproj is as below:

    <Project Sdk="Microsoft.NET.Sdk.Web">
    
      <PropertyGroup>
        <TargetFramework>netcoreapp2.1</TargetFramework>
      </PropertyGroup>
    
      <ItemGroup>
        <PackageReference Include="Microsoft.AspNetCore.App" />
        <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.1" />
      </ItemGroup>
    
    </Project>
    

    Best Regards,

    Brando

    Tuesday, August 28, 2018 7:57 AM