Base image with VS 2017 build tools #3322
-
Any help is appreciated. I am looking for a base image that includes VS 2017 build tools. I am trying to create a dockerfile to support .NET 4.6.1 framework and compile using VS 2017 build tools. Below code works: (VS 2015 build tools)
Below code failes: (VS 2017 build tools)
The only difference is the download link. Looks like something is weird about the VS 2017 download link. How to I install VS 2017 build tools or are there any existing image I can use? Thanks Host Environment:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is documentation for how to install VS Build Tools for each of the supported VS versions. The page for VS 2017 can be found at https://docs.microsoft.com/visualstudio/install/build-tools-container?view=vs-2017. In your scenario, it would look something like this: # escape=`
FROM microsoft/dotnet-framework:4.7.2-sdk-windowsservercore-ltsc2016
# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"
RUN `
# Download the Build Tools bootstrapper.
curl -SL --output vs_buildtools.exe https://aka.ms/vs/15/release/vs_buildtools.exe `
`
&& (start /w vs_buildtools.exe --quiet --wait --norestart --nocache `
--installPath C:\BuildTools
|| IF "%ERRORLEVEL%"=="3010" EXIT 0) `
`
# Cleanup
&& del /q vs_buildtools.exe Note that there is a separate for repo for the .NET Framework container images: https://github.com/microsoft/dotnet-framework-docker. This discussion post would be better suited there. |
Beta Was this translation helpful? Give feedback.
There is documentation for how to install VS Build Tools for each of the supported VS versions. The page for VS 2017 can be found at https://docs.microsoft.com/visualstudio/install/build-tools-container?view=vs-2017.
In your scenario, it would look something like this: