Publishing to Azure Web App Fails to Overwrite DLL

Brad Varey 101 Reputation points
2019-12-11T18:45:40.267+00:00

I developed a single-project Net Core site under Visual Studio for Mac some time ago, and published under Azure as a Web App.

Since, the site has become a multi-project site. If I attempt to publish now to Azure, the publication works Okay, but when I run the site, I get a message "...type XXX could not be found in assembly YYY...", indicative of the old one-project structure.

However, if I publish the same project to an entirely new Web App on Azure, it works fine.

So I assume publishing to the old Azure web app is failing to completely delete the old DLLs.

How can I flush the old web app site so I can publish to it as if it were the first time?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,827 questions
0 comments No comments
{count} votes

Accepted answer
  1. Brad Varey 101 Reputation points
    2019-12-12T08:43:24.49+00:00

    Hey Ryan
    Thanks very much for this quick response.

    To follow up, the fact is, I am using Visual Studio for Mac, which doesn't seem to support the dialog box you refer to.

    However, a bit of poking around landed me the solution, which I relate now for other users.

    In the Visual Studio Solution panel for the project, there is a folder Properties/PublishProfiles. This contains a .pubxml file for all the publish options that appear when you right click the project and select Publish. One of the options in this file is....

        False  
      
    

    Which was set to True. Set it to false, rebuild and re-publish, and the problem vanishes.

    Thanks

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ryan Hill 25,476 Reputation points Microsoft Employee
    2019-12-11T22:35:42.19+00:00

    Hi @Brad Varey , to flush, use the Remove additional files at destination option to delete the all the existing files in your publish profile. This will remove all files at the destination and copy over the new project output files

    alt text

    0 comments No comments