locked
Cannot publish to Azure: 'Can't find existing loaded project' error RRS feed

  • Question

  • Hello, I'm getting an error when I try to publish my solution to Azure. 

    I'm using Visual Studio 2015, and .net 5 RC1. 

    My project is an 'Existing Website'.

    When I try to deploy to Azure, I get the error:

    ------ Build started: Project: StaticWeb, Configuration: Debug Any CPU ------
    ------ Publish started: Project: StaticWeb, Configuration: Debug Any CPU ------
    Can't find existing loaded project:C:\[Path-To-Website]\StaticWeb

    The website is nothing more than a simple set of html files and a web.config file. Nothing complicated. It used to publish and deploy, but now it refuses to do so. This means I cannot publish to Azure!

    I've tried removing the project from the solution and adding it again as 'Existing Website'. Same error. Restarted Visual Studio several times and restarted the computer.

    The project also runs locally without any problems, so there is no build problem.

    Regards,

    Dirk

    Wednesday, December 2, 2015 4:52 AM

All replies

  • Hello Dirk,

    Thank you for contacting us. Are you following the steps mentioned in the below article?


    http://blogs.msdn.com/b/avkashchauhan/archive/2012/06/26/deploying-windows-azure-website-using-visual-studio-web-publish-wizard.aspx

    You can test your connection by “validate connection” option as well for correctness.

    I will research on this in the mean time and will get back you shortly. Try enabling debugging to see if that can help.

    For debugging:-
    https://azure.microsoft.com/en-in/documentation/articles/cloud-services-dotnet-diagnostics/

    http://blogs.msdn.com/b/cie/archive/2014/01/24/windows-azure-remote-debugging.aspx

    Regards,

    Dipin Mathew.

    Wednesday, December 2, 2015 6:46 PM
  • Hello, Thank you for looking into this for me.

    No I hadn't actually setup the publish profile that way as per the article. The way I had done it was by right clicking on the project, selecting 'Publish Web site', then in the Publish Web wizard on the first tab (called Profile), I selected'Microsoft Azure App Service' option (as opposed to the 'Import' option as per your article. Since I am already logged into an Azure from within Visual Studio, I was then presented with a list of existing App services, of which I selected one.

    This all worked fine at the beginning of last week.

    Note that when I validate connection - it says success.

    I don't think that enabling remote debugging is going to help, because the website is fine. The error I am receiving 'Can't find existing loaded project' occurs in Visual Studio in the Output pane (not in Azure or on the website). My website which is running a previous deployment is still running 100% okay.

    Other things I tried now:

    I downloaded the publish profile and did 'Import' in the VS publish wizard as per the article - same error.

    I tried to publish to a brand new website as well I just created in Azure - same error.

    I'm using: .NET Target Framework: 4.6

    Regards,

    Dirk


    Thursday, December 3, 2015 2:51 AM
  • In you Azure App Service Activity, click the Publish Web Icon next to the drop down menu in the top left of the window

    www.codegrail.com

    • Proposed as answer by Dipin M Thursday, December 3, 2015 8:04 PM
    Thursday, December 3, 2015 2:21 PM
  • Thanks for this tip!  Something definitely changed because I used to be able to publish by right-clicking on the solution and selecting Publish Web App.  I did install the ASP.NET 5 RC1 update the other day.  Maybe that did it.

    Ray Riopel

    Thursday, December 3, 2015 6:05 PM
  • No Problem.  Same here as well on the RC1 update.  Maybe MSFT put it in the notes :).

    www.codegrail.com

    • Proposed as answer by thangqddddd Monday, February 15, 2016 3:56 PM
    • Unproposed as answer by thangqddddd Monday, February 15, 2016 3:56 PM
    Thursday, December 3, 2015 6:14 PM
  • Right-clicking on the project in the Solution Explorer and selecting "Publish Web App" is the only way I know how to do this.  What "Azure App Service Activity" window are you speaking of?  How do I display this window?
    Friday, December 4, 2015 6:16 PM
  • I'm pretty sure same for VS 2015, here is an article I found on Bing that may help you

    http://blogs.msdn.com/b/visualstudio/archive/2015/03/24/introducing-the-azure-api-apps-tools-for-visual-studio-2013.aspx


    www.codegrail.com

    Sunday, December 6, 2015 11:20 PM
  • Go to View>Other Windows>Web Publish Activity - this adds the "Azure App Service Activity"

    There is an icon yakanzi Publish Web. Clicking on Publish Web publishes the website. I had the same problem as you and it has worked


    • Edited by penielt Thursday, December 10, 2015 9:51 AM
    Thursday, December 10, 2015 9:49 AM
  • Go to View>Other Windows>Web Publish Activity - this adds the "Azure App Service Activity"

    There is an icon yakanzi Publish Web. Clicking on Publish Web publishes the website. I had the same problem as you and it has worked

    • Proposed as answer by mrtree79 Monday, December 21, 2015 3:44 PM
    Thursday, December 10, 2015 9:54 AM
  • I was also wondering about why there is a need to do that and what is this view. Found it at this path:

    View>Other Windows>Web Publish Activity

    Not clear answer on why this is now necessary.


    og-bit.com

    Wednesday, January 6, 2016 11:14 PM
  • Holy schmolly.  The old publish mechanism doesn't work.  This is azure specific.  Even within Microsoft, they have to do things different than everyone else.  F! microsoft!
    • Edited by thangqddddd Monday, February 15, 2016 12:24 AM
    Monday, February 15, 2016 12:07 AM
  • This is actually some kind of a bug, I have 2 website project in VS, one of them does publish normally, while the other one would only publish from View>Other Windows>Web Publish Activity.

    The data above this text is pseudorandom, brace yourselves.

    Thursday, February 25, 2016 3:39 PM
  • Fourteen months later, this problem still exists.

    The suggested workaround continues to work, but it seems VERY odd that two top-line Microsoft products, VS 2015 Pro and Azure SQL Web Apps still cannot talk together properly via the menu option titled "Publish Web App" (previously known as Publish Website)

    I am wondering if there is a more elegant fix available now.

    I've seen this syndrome before, where an ASP.NET project picks up baggage from earlier versions of VS or Azure (been on VS since 2002, Azure since 2009) that breaks current product behavior, but because 99% of new development never inherits anything, only the legacy apps manifest this problem.

    Wednesday, February 15, 2017 9:05 PM