Skip to content

Willow MSBuild does not look up MSBuild extension path under VS folder when using MSBuildExtensionPath32 #954

Closed

Description

@davkean

Running from a Willow command-prompt, with the following variations of imports:

  <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
[...]
   <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets"" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" />

and

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\VSSDK\Microsoft.VsSDK.targets"/>

Under a Willow command-prompt, I would expect all of these to get found under C:\Program Files (x86)\Microsoft Visual Studio 15.0\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK.

Instead I get:

D:\roslyn-project-system\build\Targets\VSL.Imports.targets(368,3): error MSB4019: The imported project "C:\Program File
s (x86)\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.targets" was not found. Confirm that the path in the
 <Import> declaration is correct, and that the file exists on disk. [D:\roslyn-project-system\src\ProjectSystemDogfoodS
etup\ProjectSystemDogfoodSetup.csproj] [D:\roslyn-project-system\build\build.proj]

Activity

  1. davkean commented on Aug 26, 2016

    @davkean
    MemberAuthor

    This might be because VsInstallRoot isn't set? Can't figure out how this calculated.

  2. davkean commented on Aug 30, 2016

    @davkean
    MemberAuthor
  3. davkean commented on Aug 30, 2016

    @davkean
    MemberAuthor

    Oh, I looked at the log - turns out this is NuGet.exe running MSBuild:

                       Using "Exec" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
                       Task "Exec" (TaskId:3)
                         Task Parameter:Command="C:\roslyn-project-system\build\..\build\bin\NuGet.exe" restore -verbosity quiet "C:\roslyn-project-system\build\..\src\ProjectSystem.sln" (TaskId:3)
                         "C:\roslyn-project-system\build\..\build\bin\NuGet.exe" restore -verbosity quiet "C:\roslyn-project-system\build\..\src\ProjectSystem.sln" (TaskId:3)
    18:34:52.092     1>C:\roslyn-project-system\build\Targets\VSL.Imports.targets(365,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\roslyn-project-system\src\Microsoft.VisualStudio.ProjectSystem.CSharp.VS\Microsoft.VisualStudio.ProjectSystem.CSharp.VS.csproj] [C:\roslyn-project-system\build\build.proj]
    18:34:52.190     1>C:\roslyn-project-system\build\Targets\VSL.Imports.targets(365,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\roslyn-project-system\src\Microsoft.VisualStudio.ProjectSystem.VisualBasic.VS\Microsoft.VisualStudio.ProjectSystem.VisualBasic.VS.csproj] [C:\roslyn-project-system\build\build.proj]
    18:34:52.304     1>C:\roslyn-project-system\build\Targets\VSL.Imports.targets(365,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\roslyn-project-system\src\Microsoft.VisualStudio.ProjectSystem.CSharp.VS\Microsoft.VisualStudio.ProjectSystem.CSharp.VS.csproj] [C:\roslyn-project-system\build\build.proj]
    18:34:52.322     1>C:\roslyn-project-system\build\Targets\VSL.Imports.targets(365,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\roslyn-project-system\src\Microsoft.VisualStudio.ProjectSystem.CSharp.VS\Microsoft.VisualStudio.ProjectSystem.CSharp.VS.csproj] [C:\roslyn-project-system\build\build.proj]
    18:34:52.438     1>C:\roslyn-project-system\build\Targets\VSL.Imports.targets(365,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\roslyn-project-system\src\Microsoft.VisualStudio.ProjectSystem.VisualBasic.VS\Microsoft.VisualStudio.ProjectSystem.VisualBasic.VS.csproj] [C:\roslyn-project-system\build\build.proj]
    18:34:52.458     1>C:\roslyn-project-system\build\Targets\VSL.Imports.targets(365,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\roslyn-project-system\src\Microsoft.VisualStudio.ProjectSystem.VisualBasic.VS\Microsoft.VisualStudio.ProjectSystem.VisualBasic.VS.csproj] [C:\roslyn-project-system\build\build.proj]
    18:34:52.472     1>C:\roslyn-project-system\build\Targets\VSL.Imports.targets(365,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\roslyn-project-system\src\ProjectSystemSetup\ProjectSystemSetup.csproj] [C:\roslyn-project-system\build\build.proj]
    18:34:52.480     1>C:\roslyn-project-system\build\Targets\VSL.Imports.targets(365,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\roslyn-project-system\src\VisualStudioEditorsSetup\VisualStudioEditorsSetup.csproj] [C:\roslyn-project-system\build\build.proj]
    18:34:52.631     1>C:\roslyn-project-system\build\Targets\VSL.Imports.targets(365,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\roslyn-project-system\src\ProjectSystemDogfoodSetup\ProjectSystemDogfoodSetup.csproj] [C:\roslyn-project-system\build\build.proj]
                          (TaskId:3)
    18:34:52.674     1>C:\roslyn-project-system\build\build.proj(30,5): error MSB3073: The command ""C:\roslyn-project-system\build\..\build\bin\NuGet.exe" restore -verbosity quiet "C:\roslyn-project-system\build\..\src\ProjectSystem.sln"" exited with code 1.
                       Done executing task "Exec" -- FAILED. (TaskId:3)
    18:34:52.674     1>Done building target "RestorePackages" in project "build.proj" -- FAILED.: (TargetId:2)
    18:34:52.675     1>Done Building Project "C:\roslyn-project-system\build\build.proj" (Build target(s)) -- FAILED.
    
  4. davkean commented on Aug 30, 2016

    @davkean
    MemberAuthor

    Filed this against NuGet: NuGet/Home#3387.

  5. added a commit that references this issue on Dec 15, 2016
    dfeae7e
  6. added a commit that references this issue on Dec 18, 2016
    2021769
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions