Closed amitsaha closed 6 years ago
@amitsaha, Do the latest sdk images eliminate your need for this? With #89, the web targets and tasks were added which should allow you to build aspnet projects.
FWIW, I did build the following Dockerfile and it appears to work as expected.
# escape=`
FROM microsoft/dotnet-framework:4.7.2-sdk
RUN Invoke-WebRequest -UseBasicParsing https://download.visualstudio.microsoft.com/download/pr/12210059/e64d79b40219aea618ce2fe10ebd5f0d/vs_BuildTools.exe -OutFile vs_BuildTools.exe; `
Start-Process vs_BuildTools.exe -ArgumentList '--add', 'Microsoft.VisualStudio.Workload.WebBuildTools', '--quiet', '--norestart', '--nocache' -NoNewWindow -Wait; `
Remove-Item -Force vs_buildtools.exe; `
Remove-Item -Force -Recurse \"${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\"; `
Remove-Item -Force -Recurse ${Env:TEMP}\*;
RUN Get-ChildItem -Directory \"${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\"
CMD powershell
Step 3/4 : RUN Get-ChildItem -Directory \"${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\"
---> Running in d9a869f460eb
Directory: C:\Program Files (x86)\Microsoft Visual
Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 5/23/2018 2:42 PM Python Tools
d----- 5/23/2018 2:46 PM Web
d----- 5/23/2018 2:46 PM WebApplications
When I built your Dockerfile it failed to build because \"${Env:ProgramData}\Package Cache\"
didn't exist.
Do the latest sdk images eliminate your need for this? With #89, the web targets and tasks were added which should allow you to build aspnet projects.
@MichaelSimons thanks a lot - yes indeed it fixes my issue.
Still not sure what's happening with my Dockerfile or the one you pasted - it has the same earlier problem - but that's not required any more 👍
Hi all,
I am facing a very strange issue while attempting to add
WebBuildTools
to adotnetframework:4.7.2-sdk
image. MyDockerfile
is as follows:When I build it, the output of the
Get-ChildItem
is as follows:Now, I manually start a container using the above built image and execute the above installation manually:
And, I can see that the web build tools have been installed.
I have tried pretty much everything I can think of (introducing sleep after the install, for example), but I can't figure out what is going on here. Any ideas at all as to what I can try?
Thanks in advance.