none
Unable to compile VSIX project that is a part of my solution using amd64 MSBuild from VS2015

    Question

  • I have this VSIX project that installs a control onto the Visual Studio toolbox.  I can compile my solution with this project without any issues when using the MSBuild from my directory: C:\Program Files (x86)\MSBuild\14.0\Bin.  However when I try to use the MSBuild from the amd64 directory: C:\Program Files (x86)\MSBuild\14.0\Bin\amd64  the build fails. 

    I am using the 64bit msbuild to build my 64bit application, however my VSIX project is configured for ANYCPU for the platform.  When using the 64bit msbuild I get this error on my build machine:

    (VerifyTargetVersion target) ->
      D:\BuildSystem15\OutsideView\packages\Microsoft.VSSDK.BuildTools.15.5.100\tools\VSSDK\Microsoft.VsSDK.targets(86,5):
    error MSB4062: The "CompareBuildTaskVersion" task could not be loaded from the assembly D:\BuildSystem15\OutsideView\packages\Microsoft.VSSDK.BuildTools.15.5.100\tools\VSSDK\Microsoft.VisualStudio.Sdk.BuildTasks.15.0.dll. Could not load file or assembly 'file:///D:\BuildSystem15\OutsideView\packages\Microsoft.VSSDK.BuildTools.15.5.100\tools\VSSDK\Microsof
    t.VisualStudio.Sdk.BuildTasks.15.0.dll' or one of its dependencies. An attempt was made to load a program with an incor
    rect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are availa
    ble, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [D:\BuildSystem15\Outsi
    deView\Source\OVDotNetApiControl\OVDotNetApiControl\OVDotNetApiControl.csproj]

    Any ideas why this same solution would compile in the 32bit msbuild and not the amd64 msbuild?


    Mike

    Wednesday, November 29, 2017 7:32 PM

Answers

  • Hi Erasure,

    >>Any ideas why this same solution would compile in the 32bit msbuild and not the amd64 msbuild?

    According to your description, I create a demo and reproduce your issue on my side, because the dll named Microsoft.VisualStudio.Sdk.BuildTasks.15.0.dll is 32-bit dll, we could not use 64-bit msbuild to compile it. I would suggest that you use 32-bit msbuild to build it, which could be used on 64-bit operation system.

    Best regards,

    Zhanglong Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Erasure Thursday, November 30, 2017 7:46 AM
    Thursday, November 30, 2017 7:39 AM
    Moderator

All replies

  • Hi Erasure,

    >>Any ideas why this same solution would compile in the 32bit msbuild and not the amd64 msbuild?

    According to your description, I create a demo and reproduce your issue on my side, because the dll named Microsoft.VisualStudio.Sdk.BuildTasks.15.0.dll is 32-bit dll, we could not use 64-bit msbuild to compile it. I would suggest that you use 32-bit msbuild to build it, which could be used on 64-bit operation system.

    Best regards,

    Zhanglong Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Erasure Thursday, November 30, 2017 7:46 AM
    Thursday, November 30, 2017 7:39 AM
    Moderator
  • Hi Zhanglong,

    Thanks for the reply. Your answer basically confirmed my hunch.  It would be nice if this was included in some documentation so that people don't waste time trying to chase down a solution for this problem.

    Mike


    Mike

    Thursday, November 30, 2017 7:46 AM