Phyticist
Phyticist

Reputation: 595

Building Django on Visual Studio Online

I'm working on a Django (1.8.6) project and using Visual Studio Online's GIT source control. I am building the application successfully in my local environment and push the changes to the VSO. However, whenever I try to build the application on VSO to be able to benefit from "Continuous Integration" as a next step (will try to deploy Azure), it fails by giving the error below:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Python Tools\Microsoft.PythonTools.Web.targets (235, 5) The environment 'env (Python 3.4) (unavailable)' is not available. Check your project configuration and try again.

Unexpected exit code received from msbuild.exe: 1

My build definition on VSO: Build Definition Screenshot

Python Version: 3.4.3

VS Version: 2015

Any suggestions regarding to my case is highly appreciated.

Upvotes: 2

Views: 470

Answers (1)

Eddie Chen - MSFT
Eddie Chen - MSFT

Reputation: 29976

This is a known issue for PTVS. MS is still working on it. Refer to this thread for details: https://github.com/Microsoft/PTVS/issues/128

There is a workaround in that thread you may use, I quote it here. The second link is unavailabe now, but the first one still works.

For deployment via PowerShell, I found this, which looks correct AFAIK. http://www.kenneth-truyers.net/2014/02/06/deploying-cloud-services-to-azure-with-powershell/ You can also use the Python Azure SDK to deploy, but that's not as well documented. This is what this test does: https://github.com/Azure/azure-sdk-for-python/blob/master/tests/test_servicemanagementservice.py#L940 Both of these assume that you are able to create the .cspkg, as that's the file you have to upload to blob storage.

Upvotes: 2

Related Questions