BYOC. MSBuild Tools is missing the Web and WCF components

matt_mckinstry's Avatar

matt_mckinstry

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('https://download.visualstudio.microsoft.com/download/pr/1e5ff7fe-162b-4a3d-8fda-3267702b551d/e25ce34fd81235ebbd79010afad8e63f/vs_buildtools.exe', $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: https://www.powershellgallery.com/packages/AppVeyorBYOC/1.0.176

  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

Generic

? 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

Recent Discussions

12 Aug, 2022 08:39 PM
11 Aug, 2022 03:44 PM
07 Aug, 2022 05:11 PM
06 Aug, 2022 11:02 AM
03 Aug, 2022 10:03 AM

 

02 Aug, 2022 02:35 PM
29 Jul, 2022 06:45 PM
29 Jul, 2022 03:35 PM
22 Jul, 2022 03:16 PM
21 Jul, 2022 10:05 PM
15 Jul, 2022 03:08 PM