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

Improve targeting pack acquisition #1135

Open
richlander opened this issue May 31, 2024 · 0 comments
Open

Improve targeting pack acquisition #1135

richlander opened this issue May 31, 2024 · 0 comments
Labels

Comments

@richlander
Copy link
Member

The pattern we use for acquiring targeting packs no longer makes sense. We chose the pattern because we were still creating new .NET Framework versions every year or two and new targeting packs with them. We needed a versioning scheme where the target framework archives we publish didn't change (for compat). We designed a scheme for that, which can be seen in the implementation. In retrospect, we could have chosen a simpler scheme, but that's now history.

# Install Targeting Packs
RUN powershell " `
$ErrorActionPreference = 'Stop'; `
$ProgressPreference = 'SilentlyContinue'; `
@('4.0', '4.5.2', '4.6.2', '4.7.2', '4.8', '4.8.1') `
| %{ `
Invoke-WebRequest `
-UseBasicParsing `
-Uri https://dotnetbinaries.blob.core.windows.net/referenceassemblies/v${_}.zip `
-OutFile referenceassemblies.zip; `
Expand-Archive referenceassemblies.zip -DestinationPath \"${Env:ProgramFiles(x86)}\Reference Assemblies\Microsoft\Framework\.NETFramework\"; `
Remove-Item -Force referenceassemblies.zip; `
}"

Let's assume the following:

  • No new .NET Framework versions and therefore no new target frameworks
  • Content integrity is a key tenet of delivering high-quality software
  • The pattern above is cryptic and not all that attractive.

We should then:

  • Make a new target framework archive, including all the target frameworks. We can still version it in some way (like timestamp it).
  • Create a content hash for it validate that in the Dockerfile (like we do in other Dockerfiles).
  • Acquire this single archive in a simpler more standard way (no funky looping).
@richlander richlander added the bug label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

1 participant