Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

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

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.

Command: "D:homesitedeploymentstoolsdeploy.cmd"
Handling .NET Web Application deployment.
D:homesiterepositoryCSharpGuitarBugs.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 ..packagesMicrosoft.Net.Compilers.1.0.0buildMicrosoft.Net.Compilers.props.
Failed exitCode=1, command="D:Program Files (x86)MSBuild14.0BinMSBuild.exe" "D:homesiterepositoryCSharpGuitarBugs.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="D:localTemp8d47c216b67c072";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false
An error has occurred during web site deployment.
rnD:Program Files (x86)SiteExtensionsKudu61.60316.2745binScriptsstarter.cmd "D:homesitedeploymentstoolsdeploy.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.

  • Setting up and using GitHub in Visual Studio 2017
  • Setting up and using GitHub in Visual Studio 2015

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
  • Microsoft.Net.Compilers
  • deploy.cmd fails locally ever since installing VS2017
  • Is there any (rough) timeframe on MSBUILD15, NuGet4 and Visual Studio 2017

#GitHub #Azure #AzureAppService #Deployment

Share the post

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

×

Subscribe to Msdn Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The Msdn Blogs.

Get updates delivered right to your inbox!

Thank you for your subscription

×