Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

Unable to publish to staging slot #15

Closed
sayedihashimi opened this issue Mar 10, 2015 · 7 comments
Closed

Unable to publish to staging slot #15

sayedihashimi opened this issue Mar 10, 2015 · 7 comments

Comments

@sayedihashimi
Copy link
Contributor

This is from @Bartmax who originally reported this at https://github.com/sayedihashimi/publish-module/issues/50

Just trying to publish a mvc 6 default template (web api) project to azure (importing publishing profile from the publishing wizard, info is correct but on preview or publish I receive :

1>------ Build started: Project: MayaKin.Web, Configuration: Release Any CPU ------
Inside GatherAllFilesToPublish
Environment variables:
Path=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\\Extensions\Microsoft\Web Tools\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\\Extensions\Microsoft\Web Tools\External\git
C:\Users\Bart\.k\runtimes\kre-clr-win-x86.1.0.0-beta3-11030\bin\kpm.cmd bundle "C:\Bartmax\MayaKin\MayaKin\src\MayaKin.Web" --out "C:\Users\Bart\AppData\Local\Temp\AspNetPublish\MayaKin.Web-42" --configuration Release --runtime kre-coreclr-win-x64.1.0.0-beta3 --wwwroot-out "wwwroot" --quiet
1>
1>  Build succeeded.
1>      0 Warning(s).
1>      0 Error(s).
1>
1>  Time elapsed 00:00:00.0860073
1>
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
Time elapsed 00:00:00.4172004
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.AspNet.Publishing.targets(205,5): Error ERROR_COULD_NOT_FIND_APPROOT_FOLDER: Web deployment task failed. (Could not map the path 'MayaKin__Staging' to an approot folder.  Make sure the relative path you specify points to the root of an application.
  Obtenga más información en: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_FIND_APPROOT_FOLDER.)
Publish failed to deploy.

found out the problem with the name on azure being __staging for the deployment slot. Deploying to the main slot works.

@sayedihashimi
Copy link
Contributor Author

@Bartmax could you delete your publish profile and try again? I heard that there were some changes to the server side recently.

@sayedihashimi
Copy link
Contributor Author

Adding @shobak101

@Bartmax
Copy link

Bartmax commented Mar 10, 2015

@sayedihashimi

TL,DR: fixed. it's working.

I deleted the publishing profile, and tried again right now successfully in first try. (I will test changing CLR and stuff to see if everything works as expected and let you know if something goes wrong)

Another thing I noticed, the variables SCM_KRE_Version and SCM_KRE_CLR are not needed this time. I removed it also from the main deployment slot and the site works without those application variables while yesterday they would throw an error if those weren't set. So all good!

Thanks for the follow up, I can use the staging slot now.

@shobak101
Copy link

@Bartmax, great, can you tell me what was the difference between the old and the new one if you still have both, I would like to know what was the problem in case someone else hits it

@sayedihashimi
Copy link
Contributor Author

Ok thanks closing

@Bartmax
Copy link

Bartmax commented Mar 10, 2015

@shobak101 Sure!

The difference I see in .pubxml is

not working (old)

    <EnableMSDeployBackup>True</EnableMSDeployBackup>
    <PublishKREVersion>kre-coreclr-win-x64.1.0.0-beta3</PublishKREVersion>

working (new)

    <EnableMSDeployBackup>False</EnableMSDeployBackup>
    no PublishKREVersion tag.

.ps1 file looks the same

and I'm not sure if I had a filename.pubxml.user which I have right now, but I cannot be sure if it was here before. The content of this file is an ecrypted password.

EDIT I confirm pubxml.user existed in both versions.

EDIT 2 setting the params as the old one still works, so I'm pretty sure this was fixed outside the .pubxml file.

@sayedihashimi
Copy link
Contributor Author

I'm guessing it was related to the backup setting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants