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

Upgrade to target version 4.8 of the .NET Framework #2738

Closed
4 of 8 tasks
TheCakeIsNaOH opened this issue Jun 16, 2022 · 10 comments · Fixed by #2739
Closed
4 of 8 tasks

Upgrade to target version 4.8 of the .NET Framework #2738

TheCakeIsNaOH opened this issue Jun 16, 2022 · 10 comments · Fixed by #2739

Comments

@TheCakeIsNaOH
Copy link
Member

TheCakeIsNaOH commented Jun 16, 2022

Since older .Net framework versions are going out of support, and because newer versions of the NuGet libraries require newer .Net versions (#508), Chocolatey CLI should be upgraded to be built on .Net 4.8

This is also a stepping stone to upgrading to dotnet 5+, #2436

This will also allow upgrading the SimpleInjector version, which likely would be helpful for #2572 and for #2693

TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 16, 2022
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 16, 2022
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 21, 2022
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 23, 2022
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 23, 2022
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 23, 2022
These tests are broken by running on .Net 4.8, see issue chocolatey#2690
They are being skipped so the integration test run passes.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 24, 2022
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 24, 2022
These tests are broken by running on .Net 4.8, see issue chocolatey#2690
They are being skipped so the integration test run passes.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 24, 2022
Now that it is building on a newer .Net version, it is not required to specify the
version explicitly, as it can be autodetected.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 27, 2022
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 27, 2022
These tests are broken by running on .Net 4.8, see issue chocolatey#2690
They are being skipped so the integration test run passes.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 27, 2022
Now that it is building on a newer .Net version, it is not required to specify the
version explicitly, as it can be autodetected.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 27, 2022
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 27, 2022
These tests are broken by running on .Net 4.8, see issue chocolatey#2690
They are being skipped so the integration test run passes.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 27, 2022
Now that it is building on a newer .Net version, it is not required to specify the
version explicitly, as it can be autodetected.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 27, 2022
The older AlphaFS version had an invalid PDB file, updated it to fix that.
Also updated the location of the system DLLs for the updated .NET version.
@AdmiringWorm AdmiringWorm added this to the 2.0.0 milestone Jun 30, 2022
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jul 1, 2022
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jul 1, 2022
These tests are broken by running on .Net 4.8, see issue chocolatey#2690
They are being skipped so the integration test run passes.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jul 1, 2022
Now that it is building on a newer .Net version, it is not required to specify the
version explicitly, as it can be autodetected.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jul 1, 2022
The older AlphaFS version had an invalid PDB file, updated it to fix that.
Also updated the location of the system DLLs for the updated .NET version.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jul 15, 2022
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jul 15, 2022
These tests are broken by running on .Net 4.8, see issue chocolatey#2690
They are being skipped so the integration test run passes.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jul 15, 2022
Now that it is building on a newer .Net version, it is not required to specify the
version explicitly, as it can be autodetected.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jul 15, 2022
The older AlphaFS version had an invalid PDB file, updated it to fix that.
Also updated the location of the system DLLs for the updated .NET version.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jul 20, 2022
gep13 added a commit to gep13/choco that referenced this issue Jan 16, 2023
We are now using Shimgen 2.0.0, so we need to bump the check for this
version number.
gep13 added a commit that referenced this issue Jan 17, 2023
(#2738) Bring in version 2.0.0 of shimgen.exe
corbob added a commit to corbob/choco that referenced this issue Jan 23, 2023
NuGet Path tests currently get conflated with the tests they're within
(when run in Test Kitchen locally). This commit puts them inside their
own Context Block so they're easier to identify. It also removes some
code that didn't actually do anything.
corbob added a commit to corbob/choco that referenced this issue Jan 23, 2023
Add tests for pushing to NuGet v2 and v3 repositories. Enhance the
`New-ChocolateyTestPackage` function to accept an additional version
part, and return the location of the built packages.
corbob added a commit to corbob/choco that referenced this issue Jan 23, 2023
NuGet Path tests currently get conflated with the tests they're within
(when run in Test Kitchen locally). This commit puts them inside their
own Context Block so they're easier to identify. It also removes some
code that didn't actually do anything.
corbob added a commit to corbob/choco that referenced this issue Jan 23, 2023
Add tests for pushing to NuGet v2 and v3 repositories. Enhance the
`New-ChocolateyTestPackage` function to accept an additional version
part, and return the location of the built packages.
gep13 added a commit that referenced this issue Jan 24, 2023
(#2738) Add tests for NuGet v2 and v3 feeds
@gep13
Copy link
Member

gep13 commented Jan 24, 2023

@TheCakeIsNaOH The core work of changing the target .NET Framework version is completed, and there are follow up issues created for the remaining work that was highlighted in this issue. As such, I am going to go ahead and close this issue out.

Let me know if you think I have missed anything.

@gep13 gep13 closed this as completed Jan 24, 2023
@gep13 gep13 changed the title Uplift to .NET Framework 4.8 Upgrade to target version 4.8 of the .NET Framework Jan 24, 2023
@gep13 gep13 added the Task label Jan 24, 2023
gep13 added a commit that referenced this issue Feb 3, 2023
This reverts commit 3b0d82f.

# Conflicts:
#	src/chocolatey.resources/helpers/chocolateyInstaller.psm1
@gep13 gep13 removed the Task label Mar 21, 2023
AdmiringWorm pushed a commit to AdmiringWorm/choco that referenced this issue May 15, 2023
…ated

Our code shouldn't touch any of the NuGet configuration code, if it does
the default configuration files will be created. This adds tests to
ensure the default configuration directories don't exist, then after a
set of tests ensures that the directories still don't exist.

(cherry picked from commit f9d149e)
@choco-bot
Copy link

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

@slonopotamus
Copy link

slonopotamus commented May 31, 2023

This broke installation of Chocolatey inside mcr.microsoft.com/windows/servercore:ltsc2019 Docker image: https://github.com/adamrehn/ue4-docker/actions/runs/5136725520/jobs/9243844531?pr=322#step:5:119

@pauby
Copy link
Member

pauby commented May 31, 2023

Please see the upgrade guide. I'd also suggest that you install a known working version rather than always installing the latest.

@slonopotamus
Copy link

I've read through upgrade guide (thanks for the link). The only relevant thing I see there is that one should reboot after installing .NET4.8. It isn't clear what "reboot" means in the context of Docker container.

Would you like me to create a separate issue with clear repro steps?

@pauby
Copy link
Member

pauby commented May 31, 2023

The solution for Docker would be to use a Docker image that has .NET 4.8 already installed.

Would you like me to create a separate issue with clear repro steps?

This isn't a Chocolatey CLI issue but a Docker container one. You need to have .NET 4.8 installed in the container to use Chocolatey CLI 2.0.0. The alternative is to stick to Chocolatey CLI 1.4.0.

@slonopotamus
Copy link

slonopotamus commented May 31, 2023

This isn't a Chocolatey CLI issue but a Docker container one.

I would agree with this if Chocolatey 2.0.0 installer just errored out with "you need .NET 4.8 as a prerequisite to use this thing, bye". This would send user a clear signal on what they are missing in their setup.

But Chocolatey installer is trying to install .NET and fails to proceed after that. So possibly there exists a solution involving tweaks to the installer script that would make it Just Work.

Anyway, I'm going to follow your suggested workarounds for now, no problem.

@pauby
Copy link
Member

pauby commented May 31, 2023

But Chocolatey installer is trying to install .NET and fails to proceed after that. So possibly there exists a solution involving tweaks to the installer script that would make it Just Work.

Chocolatey has installed .NET 4.8 on your Docker container, as it was not already installed. It then indicates that a reboot is required and doesn't reboot for you (to be safe).

image

A Docker container cannot be rebooted, so you need to use a container with .NET 4.8 installed already. We provide a Docker container for you to use.

If you create your own, then please understand the requirements of the software and, as I said, only use a known working version. Installing the latest for any software is going to always cause you problems somewhere along the road.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants