locked
How to perform a clean deployment from GitHub RRS feed

  • Question

  • I have been playing with Azure Websites lately publishing from GitHub for simplicity (great feature btw).

    I have noticed that if I switch projects (deploying from different GitHup repos) I always get conflicts in after I deploy.

    Multiple types were found that match the controller named 'Home'. This can happen if the route that services this request ('{controller}/{action}/{id}') does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the 'MapRoute' method that takes a 'namespaces' parameter.

    The request for 'Home' has found the following matching controllers:
    BlobUploader.Controllers.HomeController
    AdminAppTest.Controllers.HomeController

    This is fixed if I do a single publish directly from VS using the "Remove additional files during publishing" option.

    Is there an option somewhere to make GitHub publishing also remove additional files? (Reading on the internet I get the feeling that this should be the case but it does not look like it in my case)

    • Edited by Martin Wåger Friday, September 27, 2013 9:08 AM formating
    Friday, September 27, 2013 9:06 AM

Answers

  • Normally, we don't delete the whole wwwroot folder before publishing, because there could be runtime generated files (e.g. in App_Data) that would be lost.

    But I can see how this leads to strange results in a case like above. I think we can make this smarter, and I opened an issue to track it.

    • Proposed as answer by David Ebbo Friday, September 27, 2013 5:26 PM
    • Marked as answer by Martin Wåger Saturday, September 28, 2013 9:28 PM
    Friday, September 27, 2013 5:25 PM