Could not find AxImp.exe when trying to build PTVS

Nov 2, 2014 at 5:44 PM
I just finished cloning the PTVS repo and getting my toolchain all set up to make edits to PTVS, but when I try to run msbuild from the command line as described in the Building PTVS guide, I get the following build errors:
"D:\PTVS\Python\PythonTools.sln" (default target) (1) ->
"D:\PTVS\Python\Product\PythonTools\PythonTools.csproj" (default target) (2) ->
"D:\PTVS\Python\Product\ReplWindow\ReplWindow.csproj" (default target) (16) ->
(ResolveComReferences target) ->
  C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targe
ts(2234,5): warning MSB3084: Task attempted to find "AxImp.exe" in two location
s. 1) Under the "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX
4.5.1 Tools\" processor specific directory which is generated based on SdkTools
Path 2) The x86 specific directory under "C:\Program Files (x86)\Microsoft SDKs
\Windows\v8.1A\bin\NETFX 4.5.1 Tools\" which is specified by the SDKToolsPath p
roperty. You may be able to solve the problem by doing one of the following:  1
) Set the "SDKToolsPath" property to the location of the Microsoft Windows SDK.
 [D:\PTVS\Python\Product\ReplWindow\ReplWindow.csproj]


"D:\PTVS\Python\PythonTools.sln" (default target) (1) ->
"D:\PTVS\Common\Tests\SccPackage\TestSccPackage.csproj" (default target) (28) -
>
  C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targe
ts(2234,5): warning MSB3084: Task attempted to find "AxImp.exe" in two location
s. 1) Under the "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX
4.5.1 Tools\" processor specific directory which is generated based on SdkTools
Path 2) The x86 specific directory under "C:\Program Files (x86)\Microsoft SDKs
\Windows\v8.1A\bin\NETFX 4.5.1 Tools\" which is specified by the SDKToolsPath p
roperty. You may be able to solve the problem by doing one of the following:  1
) Set the "SDKToolsPath" property to the location of the Microsoft Windows SDK.
 [D:\PTVS\Common\Tests\SccPackage\TestSccPackage.csproj]


"D:\PTVS\Python\PythonTools.sln" (default target) (1) ->
"D:\PTVS\Python\Product\PythonTools\PythonTools.csproj" (default target) (2) ->
"D:\PTVS\Python\Product\ReplWindow\ReplWindow.csproj" (default target) (16) ->
(ResolveComReferences target) ->
  C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targe
ts(2234,5): error MSB3086: Task could not find "AxImp.exe" using the SdkToolsPa
th "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\"
 or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Wind
ows\v8.1A\WinSDK-NetFx40Tools-x86". Make sure the SdkToolsPath is set and the t
ool exists in the correct processor specific location under the SdkToolsPath an
d that the Microsoft Windows SDK is installed [D:\PTVS\Python\Product\ReplWindo
w\ReplWindow.csproj]


"D:\PTVS\Python\PythonTools.sln" (default target) (1) ->
"D:\PTVS\Common\Tests\SccPackage\TestSccPackage.csproj" (default target) (28) -
>
  C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targe
ts(2234,5): error MSB3086: Task could not find "AxImp.exe" using the SdkToolsPa
th "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\"
 or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Wind
ows\v8.1A\WinSDK-NetFx40Tools-x86". Make sure the SdkToolsPath is set and the t
ool exists in the correct processor specific location under the SdkToolsPath an
d that the Microsoft Windows SDK is installed [D:\PTVS\Common\Tests\SccPackage\
TestSccPackage.csproj]

    2 Warning(s)
    2 Error(s)
Upon doing some searching, I've found that this is likely some Windows SDK or .NET SDK dependency that I don't have, but I'm not sure which one. I tried installing the Windows 8 SDK along with the .NET development kit that comes with it, but that didn't seem to work. Also, I confirmed that I have .NET 3.5 installed (according to Windows programs & features), but when I try to run the dotnetfx 3.5 setup utility, it prompts me for administrator credentials and then does nothing else afterward, like it simply closed itself. Could this be the reason why?

Any help would be appreciated!
Coordinator
Nov 2, 2014 at 6:34 PM
I think that file should be part of Visual Studio, so you may need to repair the installation of VS to get it back if it's gone missing.

Also, are you running on Windows 8 or Windows 7? We haven't tried building on Windows 7 in a while now, so it's possible that it's broken...
Marked as answer by Webs on 11/4/2014 at 11:22 AM
Nov 4, 2014 at 4:18 AM
Edited Nov 4, 2014 at 4:34 AM
Thanks for the tip; it was indeed caused by a corrupted VS install. After setting up VS on a clean Windows VM, I was able to get it to build correctly, but only after installing the HPC toolchain. Apparently, even with excluding those projects in Visual Studio, msbuild still builds them (which makes sense - they're still part of the solution that is buildable, after all), so I was forced to install them even though they were marked as optional in the documentation. Building through VS and excluding them works, and you don't need to install them. Perhaps the docs could be clarified some to point this out? Ultimately, a very minor speedbump in a fairly painless process.

Thanks for the help in getting set up!
Coordinator
Nov 4, 2014 at 6:08 PM
Thanks for pointing that out. I've fixed up the build so that we will exclude HPC automatically if the dependencies are missing. Not sure when we'll be able to update the sources (blocked on some currently unannounced info that's made it into our code) but when we can next push it you'll see a much improved build.

Out of interest, why are you building PTVS? That's not meant to sound discouraging - we're genuinely interested to find out what people are doing (and it helps justify making the sources public... "it's a good thing" isn't the most convincing argument unfortunately :) ).
Nov 4, 2014 at 7:36 PM
Zooba wrote:
Out of interest, why are you building PTVS? That's not meant to sound discouraging - we're genuinely interested to find out what people are doing (and it helps justify making the sources public... "it's a good thing" isn't the most convincing argument unfortunately :) ).
Yeah, I can certainly understand that. I think extra language support in VS (Python, Ruby, Node, etc) is super awesome, and it gives me one development environment to work on all of my projects in, across all of the different languages I program in. I primarily work in C#, but I program on side projects in Python, and I really love the VS integration. I just wanted to see if there was any way I could contribute back to the project to make PTVS better. :) Building the main sources is the first step toward making sure I can actually make a useful contribution. I'm not sure exactly what that looks like (hopefully there are some simple-ish bug fixes or features lying around), but I'm sure I can figure it out.