question

BradVarey-5912 avatar image
0 Votes"
BradVarey-5912 asked ·

Publishing to Azure Web App Fails to Overwrite DLL

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-webapps
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BradVarey-5912 avatar image
1 Vote"
BradVarey-5912 answered ·

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

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ryanchill avatar image
0 Votes"
ryanchill answered ·

Hi @BradVarey-5912, 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




· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.