BYOC. MSBuild Tools is missing the Web and WCF components

matt_mckinstry's Avatar


22 Jul, 2021 12:56 PM

When building the BYOC image you can select the option to install Visual Studio 2019 Test Agent and Build Tools
However the install of the Build tools doesnt include any of the Web/WCF components.

error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VisualStudio\v16.0\
WCF\Microsoft.VisualStudio.ServiceModel.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VisualStudio\v16.0\WCF\Microsoft.Visual
Studio.ServiceModel.targets" is correct, and that the file exists on disk.

Can the deployment script be extended to include these components e.g.

vs_buildtools.exe --quiet --wait --add Microsoft.VisualStudio.Workload.WebBuildTools
vs_buildtools.exe --quiet --wait --add Microsoft.VisualStudio.Wcf.BuildTools.ComponentGroup

  1. 1 Posted by matt_mckinstry on 22 Jul, 2021 02:10 PM

    matt_mckinstry's Avatar

    Found a way to install it in the Build script but would be much nicer if it was already built into the image as its just more wasted build time

    $msbuildWCFComponentPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VisualStudio\v16.0\WCF"
      if(-not (Test-Path $msbuildWCFComponentPath)) {
        Write-Host "Install MSBuild Components" -BackgroundColor DarkMagenta -ForegroundColor White
        $exePath = "$env:TEMP\vs_BuildTools.exe"
        (New-Object Net.WebClient).DownloadFile('', $exePath)
        cmd /c start /wait $exePath --add Microsoft.VisualStudio.Workload.WebBuildTools --add Microsoft.VisualStudio.Wcf.BuildTools.ComponentGroup --passive --norestart           
        del $exePath
  2. Support Staff 2 Posted by Feodor Fitsner on 22 Jul, 2021 07:04 PM

    Feodor Fitsner's Avatar

    AppVeyor-BYOC module has been updated with these 2 components:

  3. Feodor Fitsner closed this discussion on 21 Sep, 2021 09:03 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac