none
After installing VS2017 Build tools on CI server, project containing Workflow Foundation components fails to build on Ci server

    Question

  • Locally it everything builds fine with my local installation of vs2017.


    On the build server I installed vs_BuildTools (using offline installer). No option for workflow to be found in the installer.

    One of the projects of the solution fails on build with following error

    C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Xaml.targets(193,5): error MSB4062: The "Microsoft.Build.Tasks.Xaml.PartialClassGenerationTask" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\\XamlBuildTask.dll. Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\XamlBuildTask.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. 

    * VS2017 full installer seems to have an indiviual component for workflow
    * VS_BuildTools does not seem to have an indivual component for worklow
    * I can only use the offline installer of vs_buildtools (firewall policy on the server).
    * Prior to upgrading the solution to vs2017 the project was building fine on the buildserver

    Is there anything else I need to install ?


    Tuesday, March 28, 2017 12:17 PM

Answers

  • A temporary workaround :

    I added the XamlBuildTask.dll manually from my local vs2017 installation to the folder C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin on the build server.

    This seems to fix the problem. I guess XamlBuildTask.dll is missing in the vs_BuildTools installer and should be fixed!

    Tuesday, March 28, 2017 8:25 PM

All replies

  • A temporary workaround :

    I added the XamlBuildTask.dll manually from my local vs2017 installation to the folder C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin on the build server.

    This seems to fix the problem. I guess XamlBuildTask.dll is missing in the vs_BuildTools installer and should be fixed!

    Tuesday, March 28, 2017 8:25 PM
  • @krisCevi, Thanks for sharing the solution here. You can mark it as answer which is benefit to other communities who has the same problem.

    Just as you mentioned, the same issue on Visual Stduio IDE has been fixed, this issue may exist in the vs_BuildTools. So I recommend that you can submit a new issue on Developer Community for the issue on vs_BuildTools.


    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.

    Wednesday, March 29, 2017 4:53 AM
  • From where i can get this XamlBuildTask.dll ? thanks.
    Thursday, June 01, 2017 12:47 PM
  • there is "Windows  Workflow Foundation" component in "individual component" of VS2017 installer. after install this component error build with xaml tasks will gone.
    Thursday, June 29, 2017 4:43 PM
  • After updating build tools to VS2017 15.5.6 the error returns.
    There is no Windows Workflow Foundation component in vs_buildtools probably only in vs2017 installer.
    @Leo Liu-MSFT :Can this be added to vs_buildtools offline installer ?

    Also another error :

    C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WorkflowBuildExtensions.targets(110,5): error MSB4062: The "ReportDeferredValidationErrorsTask" task could not be loaded from the assembly Microsoft.Activities.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Could not load file or assembly 'Microsoft.Activities.Build, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
    • Edited by krisCevi Sunday, February 04, 2018 5:43 PM Another error
    Sunday, February 04, 2018 5:29 PM