I have a solution with three projects. The structure is Like this:
>myApp //solution
>myApp.domain //class library
>myApp.data //class library
>myApp.web //web app
>.gitignore
>.deployment
In local environment project works fine. Even if I deploy from Visualstudio it works perfectly fine, however when I deploy it using github, deployment fails. here is the log message:
Handling .NET Web Application deployment. All packages listed in packages.config are already installed. All packages listed in packages.config are already installed. myApp.Domain -> D:\home\site\repository\myApp.Domain\bin\Release\myApp.Domain.dll CSC : error CS2001: Source file 'obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs' could not be found [D:\home\site\repository\myApp.Data\myApp.Data.csproj] CSC : error CS2001: Source file 'obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs' could not be found [D:\home\site\repository\myApp.Data\myApp.Data.csproj] CSC : error CS2001: Source file 'obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs' could not be found [D:\home\site\repository\myApp.Data\myApp.Data.csproj] Failed exitCode=1, command="D:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "D:\home\site\repository\myApp.Web\myApp.Web.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="D:\local\Temp\6bb414c0-d47f-480d-8db4-9a08459a55b5";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="D:\home\site\repository.\" An error has occurred during web site deployment. C:\Program Files (x86)\SiteExtensions\Kudu\45.40609.1605\bin\scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd
It seems deploy process couldn't find some files inside obj
directory.
I downloaded my .gitignore
from github gitignore repository, also according to this microsoft documentation there is no need for including build files.
I changed .gitignore
to include that specific folder (obj/Debug
), but it also failed.
Finally, I copied my entire project somewhere else. Then I deleted both .gitignore
and .git
. I created another github repository and I pushed everything. This time Azure deploys it successfully.
Also here is .deployment
file:
[config]
project = myApp.Web/myApp.Web.csproj
My question is Do I need to include build output files to my repository?