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

.NET 7 on Linux Support #266

Closed
lister-service opened this issue Nov 14, 2022 · 21 comments
Closed

.NET 7 on Linux Support #266

lister-service opened this issue Nov 14, 2022 · 21 comments
Labels

Comments

@lister-service
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or "me too" comments. They generate extra noise for issue followers and do not help prioritize the request.

Tell us about your request
What do you want us to build?

.NET Core 7 was officially released on November 8th.

Is this request specific to an Elastic Beanstalk platform?
If so, which one(s)?

.NET Core on Linux

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
What outcome are you trying to achieve, ultimately, and why is it hard/impossible to do right now? What is the impact of not having this problem solved? The more details you can provide, the better we'll be able to understand and solve the problem.

Looking to be able to deploy new .NET Core applications to AWS - unable to do so currently.

Are you currently working around this issue?
How are you currently solving this problem?

Still running .NET 6 for new applications

Additional context
Anything else we should know?

Attachments
If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)

@chrispaynter
Copy link

This is a massive blocker for an upgrade we want to do, I would have hoped to see Beanstalk stay up to date with the latest run times.

@chrispaynter
Copy link

Hmmm, actually I updated to this - 64bit Amazon Linux 2 v2.4.1 running .NET Core

Looks like it does support .NET 7, however they website doesn't list it in the Frameworks section.

https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platform-history-dotnetlinux.html

@chrispaynter
Copy link

Ignore that I must have read my logs wrong. .NET 7 not supported. This is something I'd consider rather urgent for AWS to resolve.

@matheuscschenfeld
Copy link

matheuscschenfeld commented Jan 9, 2023

Does anyone have a solution?

Trying to deploy a .net 7 application to Elastic Beanstalk runnion on Amazon Linux 2

@smbadiwe
Copy link

@matheuscschenfeld @chrispaynter

If you build your project as Self-Contained, you can run .NET 7 on AWS Elastic Beanstalk.

To do this, check the box: Build self-contained deployment bundle.

image

@bytecod3r
Copy link

is there any development roadmap to include dotnet 7 on the elasticbeans?

@AndrewMutation
Copy link

@smbadiwe

I've got a CI build using the command line (dotnet restore/build/publish). Do you know what the equivalent runtime ID (or other args I should pass to get the equivalent of the Amazon Publish UI?

I've tried with the folowing, but I'm not sure there is a probleme with my arguments or if its something else that isn't working.

dotnet publish "my.csproj" -c Release -o publish --runtime linux-x64

@Persimus
Copy link

@AndrewMutation for build pipelines you need to install the latest .NET build tools:

  install:
    commands:
      - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel ST

More info: https://aws.amazon.com/blogs/devops/building-net-7-applications-with-aws-codebuild/

@AndrewMutation
Copy link

AndrewMutation commented Feb 10, 2023

@Persimus

My build isn't on AWS, but that may help someone else :)

It seems like my problem is probably the glibc version on arm64 that is discussed here: dotnet/runtime#80866

When I installed (Edit: on amazon linux in EB) v7 with dotnet-install.sh, I got the error they describe: `GLIBC_2.27' not found

@AndrewMutation
Copy link

The issue seems to be resolved for me with the release of 7.0.4
I copied dotnet-install.sh onto the machine and ran it with channel 7.0

dotnet-install.sh --channel 7.0 --runtime aspnetcore -InstallDir /usr/local/dotnet/

@RedHot17
Copy link

please hurry with this

@aswanevelder
Copy link

We are nearing the one year anniversary of DotNet 7, any news when NET Core running on 64bit Amazon Linux 2 will be upgraded to .net 7?

@edvanr
Copy link

edvanr commented Jul 20, 2023

Yeah this is really holding us back. There are so many EF core features in dotnet 7 that we need and it is preventing us from upgrading everything. Very close to ditching beanstalk if this doesn't happen soon...

@utkugenel
Copy link

I solved this problem using ebextensions.

Created .ebextensions folder in the root of the project and dotnet.config file in it and added dotnet install command.
After deployment, this command run first on elastic beanstalk environment.

dotnet.config file

commands:
  01_dotnet_install:
    # install .net 7.0
    command: 'curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 7.0 --runtime aspnetcore -InstallDir /usr/local/dotnet/'

@scionwest
Copy link

I thought Amazon was pretty public about only officially supporting LTS versions of .Net on their platforms - which is 6.0. For things we want to run the latest/greatest on, we deploy to either Lambda with custom runtimes/layers or EC2 directly. For things we want to stick with LTS on, we deploy use the services that are managed more by AWS. These are things you need to take into consideration when you're designing your apps and deciding what your deployment platform will be.

@matheuscschenfeld
Copy link

I resolved this by using a Docker image in ECR and configuring the service in ECS

@slavik93
Copy link

slavik93 commented Nov 2, 2023

Based on https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platform-history-dotnetlinux.html there are no default elastic beanstalk platforms that support .NET 7.
As a workaround, you can create a default Elastic Beanstalk platform, .NET Core Linux, which supports .NET 6.
Then, connect to the EC2 instance and install .NET 7 SDK by the following commands:
sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
sudo yum install -y dotnet-sdk-7.0

@aswanevelder
Copy link

aswanevelder commented Nov 3, 2023

According to @scionwest's comment on STS not supported by AWS, then .Net 8, set to be released between November 14-16, will be the Long-Term Support (LTS) version. I guess then as a result, EB will skip .Net 7, which was a Short-Term Support (STS) release. It's uncertain how long AWS will take to implement this upgrade, but there is optimism for the future.

@slavik93
Copy link

slavik93 commented Nov 3, 2023

As an additional option, to deploy a project with a greater .NET SDK than 6 is to add a configuration file in the uploaded Zip for Elastic Beanstalk to install the dependencies during deployment.
Directory Location: You create a directory named .ebextensions at the root of your application source code. Inside this directory, you place configuration files(e.g. 01_install_dotnet_7.config) in YAML or JSON format.
This is the file content to install .NET 7 SDK:
commands:
01_install_dotnet_7:
command: |
sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
sudo yum install -y dotnet-sdk-7.0

@xaviermarquez-alba
Copy link

@matheuscschenfeld @chrispaynter

If you build your project as Self-Contained, you can run .NET 7 on AWS Elastic Beanstalk.

To do this, check the box: Build self-contained deployment bundle.

image

this works for me; using dotnet publish project -c Release -o build --self-contained true

@praegt
Copy link

praegt commented Apr 29, 2024

Superseded by .NET 8, which is LTS. Track #311 for .NET 8 on Linux

@praegt praegt closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests