Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

al.exe missing on sdk 4.8 #313

Open
RMarinaro opened this issue Jul 8, 2019 · 8 comments

Comments

@RMarinaro
Copy link

commented Jul 8, 2019

Trying to build a project that relies on the build tools on the 4.8 images throws an error:

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(3628,5): error MSB3086: Task could not find "al.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\NETFXSDK\4.7.2\WinSDK-NetFx40Tools-x86". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed [C:\codebuild\tmp\output\src323577031\vendor-portals\BCS.VendorPortals\BCS.VendorPortals.Core\BCS.VendorPortals.Core.vbproj] 
Done Building Project "C:\codebuild\tmp\output\src323577031\vendor-portals\BCS.VendorPortals\BCS.VendorPortals.Core\BCS.VendorPortals.Core.vbproj" (default targets) -- FAILED. 
Done Building Project "C:\codebuild\tmp\output\src323577031\vendor-portals\BCS.VendorPortals\BCS.VendorPortals.WebApp\BCS.VendorPortals.WebApp.vbproj" (DeployOnServer target(s)) -- FAILED. 

It looks like it is trying to look for the SDK tools in the 4.7.2 directory instead of 4.8. Reverting the SDK image to 4.7.2 fixed the build

I think this is related to #169

@mthalman

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

I believe this is related to #214, but in the context of 4.8 instead of 4.7.2.

@MichaelSimons

This comment has been minimized.

Copy link
Member

commented Jul 15, 2019

Assigning to @mthalman, to investigate.

@Smenus

This comment has been minimized.

Copy link

commented Jul 15, 2019

I have my own version of the sdk image, because we needed to add a few extra things during the Build Tools install.
I've added this line to the end of the SDK install bit, and it does mean that the .exes from the 4.8 SDK are found by msbuild...

	&& powershell -Command "$ErrorActionPreference = 'Stop'; (Get-Content '%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe.config' -Encoding UTF8) -replace 'NETFXSDK\\4\.7\.2', 'NETFXSDK\4.8' | Set-Content '%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe.config' -Encoding UTF8"

Not the prettiest work around, but it did work!

@mthalman

This comment has been minimized.

Copy link
Member

commented Jul 18, 2019

See #326 for a repro project.

@mthalman

This comment has been minimized.

Copy link
Member

commented Jul 18, 2019

@rainersigwald - I'm pretty sure this problem stems from SDK40ToolsPath being set to a 4.7.2 registry path in the MSBuild.exe.config. Same sort of issue as #214. Do you know whether this path would be updated when 4.8 is available for install in the VS Build Tools? Or is it completely unrelated to that?

@mthalman

This comment has been minimized.

Copy link
Member

commented Jul 18, 2019

I've verified that installing 4.7.2 in the SDK image fixes the problem. Interestingly, doing this decreases the size of the image by 33 MB. The layer that installs the SDK gets larger but some of the downstream layers get smaller with an overall net loss.

@mthalman

This comment has been minimized.

Copy link
Member

commented Jul 18, 2019

I've verified that installing 4.7.2 in the SDK image fixes the problem. Interestingly, doing this decreases the size of the image by 33 MB. The layer that installs the SDK gets larger but some of the downstream layers get smaller with an overall net loss.

I take that back. I had things misconfigured in this analysis. Installing 4.7.2 in the SDK image results in an image that is 11.3 MB larger.

@rainersigwald

This comment has been minimized.

Copy link

commented Jul 22, 2019

This is exactly the same as #214, except that the default moved from 4.6.1 (Visual Studio 2017) to 4.7.2 (Visual Studio 2019 16.0, 16.1, 16.2, but with bugs that mean that you probably also want 4.6.1 installed 😬).

For the forthcoming 16.3, the default is moving to 4.8 (microsoft/msbuild#4487, cc @tmeschter), and hopefully we'll have enough lead time to fix up some of the bugs so installing only that should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.