.xml file listed in local .csproj contents but not present in Azure web app files, causing error

Thomas, James 0 Reputation points
2025-03-24T17:02:55.9033333+00:00

I have a deployed Azure Web Application that is linked to the GitHub repo triggered to automatically build and deploy with each new push to the repo on the main branch. The Github actions I wrote run without any error the same result is found in the deployment logs, with no error. When I check the end-to-end transactions of the Aure web application it indicates that it can not find the .XML file in C:\home\site\wwwroot\Web Form API.xml. My attempt to clear this error was updating the Build Action property setting of the file to Content. After updating the value I checked git changes and saw that the "Web Form API.xml" was then added to the .csproj file. I saved these updates to the local repository and pushed to my remote repo to trigger a new build/deploy process. I checked github to ensure the updated file was loaded, which it was, and that the actions successfully ran, which they also did. My issue is that the newly deployed application was still triggering the same error in the Web Application.

Web App Stack Trace
User's image setting .XML document propertiesUser's image

.xl included in csproj file
User's image

updates present in remote repo
User's image

GHAction completed successfully:
User's image

How do I add the missing files that are causing this error?

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
255 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Thomas, James 0 Reputation points
    2025-03-24T17:21:14.05+00:00

    I continued reading and found the answer in this question.

    I needed to set the properties of the file to Copy if Newer.

    https://learn.microsoft.com/en-us/answers/questions/143091/cant-find-xml-files-in-published-c-project


  2. Bhargavi Naragani 3,165 Reputation points Microsoft External Staff
    2025-03-24T23:45:53.9233333+00:00

    Hi @Thomas, James;

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer.

    Issue: .xml file listed in local .csproj contents but not present in Azure web app files, causing error

    Solution:

    I continued reading and found the answer in this question.

    I needed to set the properties of the file to Copy if Newer.

    https://learn.microsoft.com/en-us/answers/questions/143091/cant-find-xml-files-in-published-c-project


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.