Coder Social home page Coder Social logo

Comments (4)

westy avatar westy commented on July 18, 2024

This here appears to work though!

#escape=`

FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019

SHELL ["cmd", "/S", "/C"]

# Install VS components
RUN `
    # Install SSDT Build Tools
    curl -fSLo vs_BuildTools.exe https://aka.ms/vs/17/release/vs_BuildTools.exe `
    && start /w vs_BuildTools ^ `
        --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" ^ `
        --add Microsoft.VisualStudio.Component.SQL.SSDTBuildSku ^ `
        --quiet --norestart --nocache --wait `
    && powershell -Command "if ($err = dir $Env:TEMP -Filter dd_setup_*_errors.log | where Length -gt 0 | Get-Content) { throw $err }" `
    && del vs_BuildTools.exe

# Try and force install using now installed vs_installer
WORKDIR "C:/Program Files (x86)/Microsoft Visual Studio/installer"
RUN vs_installer.exe `
    modify --quiet --nocache --add Microsoft.VisualStudio.Component.SQL.SSDTBuildSku --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools"

RUN `
    # Cleanup
    (for /D %i in ("%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\*") do rmdir /S /Q "%i") `
    && (for %i in ("%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\*") do if not "%~nxi" == "vswhere.exe" del "%~i") `
    && powershell Remove-Item -Force -Recurse "%TEMP%\*"
    # `
    # && rmdir /S /Q "%ProgramData%\Package Cache"

WORKDIR /
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

So, at least I can progress.
Be interested to know why the vs_buildtools route does not work though!

from dotnet-framework-docker.

mthalman avatar mthalman commented on July 18, 2024

This is how I typically add more components: #979 (comment). I notice you don't use the modify in the first install command. Can you try that?

Also, there are a lot of log files output to the TEMP directory. When there's an install failure, I recommend looking through all of them.

from dotnet-framework-docker.

westy avatar westy commented on July 18, 2024

Thanks for the response.
I'll try it with modify. I was using that when trying the various VS installers (but no luck there either), but didn't see it as an option for vs_BuildTools.

I have captured a LOT of logs from %TEMP% and diffed them many times.
Nothing much useful that I can see other than the installer one I have posted.

I'll report back with progress.

Cheers

from dotnet-framework-docker.

westy avatar westy commented on July 18, 2024

Oh blimey, thank you, that was it!

Very odd that was working fine for ages without it.
Thanks, I'll close this now.

Wish I'd asked a week ago now :D

from dotnet-framework-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.