I was working on these other articles:
- How to deploy from GitHub using someone else’s repository
- How to configure GitHub or VSTS for use with an Azure Function
- Deploy GitHub source code repositories to an Azure App Service
- Failed to deploy from GitHub to Azure App Service Web App, missing project reference
- Deploy an App Service using Azure PowerShell to a Deployment Slot
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.
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:_
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"
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.
- Add “Build Tools for Visual Studio 2017” to Azure App Service – MSBuild15
- deploy.cmd fails locally ever since installing VS2017
- Is there any (rough) timeframe on MSBUILD15, NuGet4 and Visual Studio 2017
#GitHub #Azure #AzureAppService #Deployment