1

Resolved

Can't run web project on 2.1 daily build

description

I installed PTVS CL64603 on VS 2012 and 2013, both same result.

I get the following message box on a django project, or other web project type:
Failed to get command PythonDebugWebServerCommand from project

comments

Zooba wrote Jan 8 at 7:10 PM

This is already fixed, I just haven't checked it in yet (because I'm still working on publishing).

qloz wrote Apr 17 at 10:09 PM

I just hit this same issue with Python 2.1 Beta that I downloaded today

Zooba wrote Apr 17 at 10:27 PM

Hi qloz

You should see some output in the Output Window (on the Build pane) explaining what failed. Can you copy/paste that for us?

aaapurdy wrote May 14 at 1:54 PM

I am experiencing the same error. I have VS 2010 installed with Python Tools 2.1 Beta. My Output Window messages follow.

Target ResolveStartupPath:
C:\Program Files\MSBuild\Microsoft\VisualStudio\v11.0\Python Tools\Microsoft.PythonTools.targets(145,5): error MSB4036: The "ConvertPathToModuleName" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" directory.
Done building target "ResolveStartupPath" in project "Connected.pyproj" -- FAILED.

Done building project "Connected.pyproj" -- FAILED.

Build FAILED.

C:\Program Files\MSBuild\Microsoft\VisualStudio\v11.0\Python Tools\Microsoft.PythonTools.targets(145,5): error MSB4036: The "ConvertPathToModuleName" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" directory.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.00
C:\Program Files\MSBuild\Microsoft\VisualStudio\v11.0\Python Tools\Microsoft.PythonTools.targets(145,5): error MSB4036: The "ConvertPathToModuleName" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" directory.
Done building project "Connected.pyproj" -- FAILED.

Build FAILED.

Zooba wrote May 14 at 3:21 PM

aaapurdy - your output suggests you have VS 2012 not VS 2010. Can you confirm which version you have?

aaapurdy wrote May 14 at 3:45 PM

Zooba - I have Version 10.0.40219.1 SP1 and .NET 4.5.50709 SP1

I originally had Python Tools in the v10.0 folder which yields the same error message (and same output). I copied the v10.0 content into a v11.0 folder, but still failed to resolve the issue. I'm thinking there is a path variable pointing to the v11.0 folder regardless of the VS version installed, but I haven't been able to track it down...not sure.

aaapurdy wrote May 14 at 4:00 PM

...I should also note: if I remove the v11.0 folder from \MSBuild\Microsoft\VisualStudio and try to reload my project I get, "One or more projects in the solution were not loaded correctly. Please see the Output Window for details." The output window details are below - and compound my suspicion regarding the path variable.

C:\Users\username\Documents\Visual Studio 2010\Projects\Connected\Connected\Connected.pyproj : error : The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v11.0\Python Tools\Microsoft.PythonTools.Flask.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. C:\Users\username\Documents\Visual Studio 2010\Projects\Connected\Connected\Connected.pyproj

Zooba wrote May 14 at 4:24 PM

Yes, it may be that your VSToolsPath variable is being set somewhere else (or maybe VisualStudioVersion, but that seems unlikely).

These properties exist in your project file, so you can easily change them:
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
If you remove the Condition=... parts then the global variables will be ignored (try VSToolsPath first, or your project will not be portable to other VS versions). That will at least confirm that somebody has set the value globally (and incorrectly).

Have you installed any Microsoft or Azure SDKs into VS 2012? It's possible that one of those has set the value globally, in which case we'll need to go have a chat with them... (but probably we'll just end up changing the name or removing the VSToolsPath property completely).

aaapurdy wrote May 14 at 4:46 PM

Zooba - Removing the "Condition=..." statements fixed the problem!

I have not installed Azure and I am not aware of previous Microsoft or Azure SDK installations; however, we have many updates pushed at the corporate IT level so it's possible something happened there. Looking through my folders I don't see anything related to Azure. I do have v6.0A, v7.0A, and v8.0A in \Microsoft SDKs\Windows\, but the related .xml files don't appear to be likely culprits. It's entirely possible I'm missing something.

Thank you for your help!

Zooba wrote May 14 at 5:23 PM

Okay. Maybe I'll just change our templates to not allow that path to be overridden externally. I can't think of any good reason to allow it, it's just "good practice".

Zooba wrote May 14 at 5:25 PM