0

I have a git action to build a dotnet framework web app for an Azure app service. When configured to build for release, the solution compiles fine. However, in addition to the .aspx and .dll files being copied into the output package, I am also seeing .cs and .design.cs files.

Is this expected behavior? With the project set to only include "Files needed to run the application", I assumed the output would not include source files. Is that a correct assumption? If so, is there a param I'm missing from my msbuild command that would prevent these files form being copied?

- name: MSBuild
  run: msbuild .\WebApp.sln /p:Configuration=Release
  • You have mentioned the msbuild path as WebApp.sln, instead point it to the .csproj file. Please refer SO [thread](https://stackoverflow.com/questions/16246562/using-msbuild-to-execute-a-file-system-publish-profile) and [this](https://stackoverflow.com/questions/42712055/asp-net-core-exclude-or-include-files-on-publish?noredirect=1&lq=1) for more details. – HarshithaVeeramalla-MT Dec 20 '21 at 10:03

0 Answers0