Failed to deploy from GitHub to Azure App Service Web App, missing project reference


I was working on these other articles:

And once I clicked OK which would cause the publish to happen from my GitHub to my Azure App Service Web app, I received the following exception, also seen in Figure 1.

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling .NET Web Application deployment.
D:\home\site\repository\CSharpGuitarBugs.csproj(379,5): error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props.
Failed exitCode=1, command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\home\site\repository\CSharpGuitarBugs.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="D:\local\Temp\8d47c216b67c072";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\61.60316.2745\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

image

Figure 1, The missing file is Microsoft.Net.Compilers.props when publishing to Azure

The deal is, I was using Visual Studio 2017 and I think there is some miss match with all the players in this publish.  When I put the project/solution back into Visual Studio 2015, reset the GitHub repository, I was then able to configure the deployment source and deploy as expected.

You might be interested in these articles too, but as you got here, you likely have already performed the configuration.

I read in some of the following locations that a possible solution is to include the Microsoft.Net.Compilers NuGet package into the project if it is ASP.NET.

#GitHub #Azure #AzureAppService #Deployment

Comments (0)

Skip to main content