locked
Unable to deploy WebApp from GitHub RRS feed

  • Question

  • This is what I get when deploying WebApp from GitHub (New portal >> WebApp >> Continuous Deployment >> Sync

    Command: "D:\home\site\deployments\tools\deploy.cmd" Handling .NET Web Site deployment. ASPNETCOMPILER : error 1003: The directory 'D:\home\WebSites\Unicornation\' doesn't exist. [D:\home\site\repository\Unicornation.metaproj] Failed exitCode=1, command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\home\site\repository\Unicornation.sln" /verbosity:m /nologo An error has occurred during web site deployment. \r\nC:\Program Files (x86)\SiteExtensions\Kudu\51.50219.2094\bin\scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

    Deploy works from Azure App Service Activity in Visual Studio, but doesn't work from Right Click on Website > publish website. I really have no idea what is wrong. Any help appreciated!


    The data above this text is pseudorandom, brace yourselves.

    Wednesday, February 24, 2016 9:25 PM

Answers

  • The problem is that your .sln file has some invalid relative references, e.g. at this line and a few others:

    Release.AspNetCompiler.PhysicalPath = "..\UN\"

    It's trying to .. out from the root of the repo, which won't work. Change these to just "." and it'll probably work.

    • Proposed as answer by David Ebbo Thursday, February 25, 2016 8:53 PM
    • Marked as answer by 4c74356b41MVP Friday, February 26, 2016 7:21 AM
    Thursday, February 25, 2016 8:51 PM

All replies

  • If it doesn't work when publishing from VS either, it'd best not to look at it as a GitHub deployment issue. Does it also fail if you do a 'Publish To File System' from VS? If so, then we know it's not Azure related.

    David

    Wednesday, February 24, 2016 9:38 PM
  • Well, as I said, it works from Visual Studio, if you choose to deploy it from Azure App Service Activity Panel, not from Publish WebApp > Web Deploy. Publish to File System works just fine.

    Also it was working just fine, before I imported it into GitHub.


    The data above this text is pseudorandom, brace yourselves.



    Thursday, February 25, 2016 7:55 AM
  • So this one is actually quite fun. I have 2 website projects I'm doing for fun, one of them successfully builds from GitHub and from "Publish WebApp > Web Deploy" while the other doesn't. Both projects use nothing but html\css\bootstrap\jquery. I've created a new website in visual studio, and recreated everything I did in the website that's not working (not copied files to the directory, rather copied text from them into new files). And voila, the same error is here...

    https://social.msdn.microsoft.com/Forums/en-US/e3fb032a-4790-4c37-ad44-7209187a1726/cannot-publish-to-azure-cant-find-existing-loaded-project-error?forum=windowsazuredevelopment

    This thread seems to have the same problem, and the solution posted there works for publishing stuff to Azure manually, but I want\need it to publish from GitHub.


    The data above this text is pseudorandom, brace yourselves.


    Thursday, February 25, 2016 3:21 PM
  • Is your project in VS a Web Application Project or a Web Site project?

    Given the error, one thing to check is whether you have precompilation enabled, in case that's cause the issue.

    Thursday, February 25, 2016 3:41 PM
  • How do I check that please?

    The data above this text is pseudorandom, brace yourselves.

    Thursday, February 25, 2016 6:53 PM
  • See here for info. How you created it determines the model. They work very differently.
    Thursday, February 25, 2016 7:13 PM
  • that's a website project, tried with precompilation and without it, same stuff...

    Also I've reinstalled windows 10 and Visual Studio. Same stuff...

    Actually the error is like this:

    Can't find existing loaded project:C:\Users\_\Source\Repos\UN\

    ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
    ========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

    So it's the publish that fails...


    The data above this text is pseudorandom, brace yourselves.



    Thursday, February 25, 2016 7:45 PM
  • Can you share a repro, per these instructions? That will help us get to the bottom of what's happening.
    Thursday, February 25, 2016 8:00 PM
  • So actually VS 2015 won't publish anything to Azure using Publish "WebApp > Web Deploy". I've started a new website...

    The data above this text is pseudorandom, brace yourselves.

    Thursday, February 25, 2016 8:01 PM
  • Well, those are not instructions, at least I don't see any... those are more like a guide lines... I mean, i'm really new to GitHub, I don't understand how to do that

    Well, you can fork this https://github.com/4c74356b41/UN and try to use it to publish to Azure WebApp.

    Right now I can't publish any WebSite project to Azure WebApp with WebDeploy...


    The data above this text is pseudorandom, brace yourselves.


    Thursday, February 25, 2016 8:09 PM
  • The problem is that your .sln file has some invalid relative references, e.g. at this line and a few others:

    Release.AspNetCompiler.PhysicalPath = "..\UN\"

    It's trying to .. out from the root of the repo, which won't work. Change these to just "." and it'll probably work.

    • Proposed as answer by David Ebbo Thursday, February 25, 2016 8:53 PM
    • Marked as answer by 4c74356b41MVP Friday, February 26, 2016 7:21 AM
    Thursday, February 25, 2016 8:51 PM
  • Hm, so after changing what you said, it started to build from Git, but won't publish ("WebApp > Web Deploy") anyway... Well, I guess I don't really care about that, since i'm fine with GitHub builds...

    This doesn't really make any sense at all, since the project that was successfully building from GitHub has the exact same path's ("..\projectname\") in it...

    WebApp is supposed to automatically build off GitHub right?

    Well, yeah, according to my tests it does. Thanks!


    The data above this text is pseudorandom, brace yourselves.



    Friday, February 26, 2016 7:17 AM
  • Yes, when connected to GitHub, it gets built on deployment.
    Friday, February 26, 2016 2:54 PM