I've written a Django project in Visual Studio 2015 which runs successfully on a local server when debugging via the IDE. However, when I...
- Right-click the project in Solution Explorer and select Publish
- Select
Microsoft Azure Web Appsas the publish target - Click New... and enter details to create a new web app on Azure:
- creating a new
App Service Planwith the same name as the Web App - creating a new
Resource Groupwith the same name as the Web App Region: North EuropeDatabase server: No database
- creating a new
- Click Create
- Select Publish method:
Web Deployand successfully Validate Connection to new Azure Web App - Click Publish
...the Output window shows that the Publish failed:
------ Publish started: Project: RaceLogger, Configuration: Debug Any CPU ------
Validating Web Deploy package/publish related properties...
Gather all files from Project items @(Content). Adding:
app\templates\app\performance_form.html;app\templates\auth\login.html;app\templates\index.html;app\templates\layout.html;app\templates\app\performance_detail.html;app\templates\app\performance_list.html;requirements.txt
Gather all files from Project output (IntermediateSatelliteAssembliesWithTargetPath). Adding:
Gather all files from Project items @(ReferenceCopyLocalPaths,ReferenceComWrappersToCopyLocal,ResolvedIsolatedComModules,_DeploymentLooseManifestFile,NativeReferenceFile).
Gather all files from Project items @(AllExtraReferenceFiles). Adding:
Gather all files from Project items @(_binDeployableAssemblies). Adding:
DjangoStaticUrlSetting=/static/
Regenerating web.config
Copying file from "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Python Tools\web_config.xml" to "obj\Debug\web.config".
Updating app settings in web.config
Made 1 replacement(s).
Updating rewrite conditions in web.config
Made 1 replacement(s).
Updating FastCGI handlers in web.config
Made 1 replacement(s).
Copying file from "obj\Debug\web.config" to "C:\Users\username\Documents\Files\Web_Projects\django\RaceLoggerProject\RaceLogger\web.config".
Regenerating web.debug.config
Copying file from "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Python Tools\web_debug_config.xml" to "obj\Debug\web.debug.config".
Updating ptvsd secret in web.debug.config
Made 1 replacement(s).
Copying file from "obj\Debug\web.debug.config" to "C:\Users\username\Documents\Files\Web_Projects\django\RaceLoggerProject\RaceLogger\web.debug.config".
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
I've checked that the newly created Azure Web App is running via the Azure Management Portal and have modified the Web App's Application settings so that Python version 3.4 is selected (in my local environment I'm running Python 3.4.4 and Django 1.9.3) to no avail. I've tried updating to VS2015 Update 2 RC, but this makes no difference either.
I've also tried creating the sample Django Web Project available in the New Project window of VS2015 in a Python 3.4.4 / Django 1.9.4 virtual environment and that fails to publish in exactly the same way.
Does anyone have any suggestions as to how to successfully publish a Django project to an Azure Web App from VS2015?
Any assistance would be much appreciated.