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

If I use net core 3 1. How to set gitpod #9

Open
bbhxwl opened this issue May 10, 2022 · 4 comments
Open

If I use net core 3 1. How to set gitpod #9

bbhxwl opened this issue May 10, 2022 · 4 comments

Comments

@bbhxwl
Copy link

bbhxwl commented May 10, 2022

If I use net core 3 1. How to set gitpod

@kamranayub
Copy link

This works for me:

# requires ubuntu 20.02
image: gitpod/workspace-dotnet:2023-01-10-16-35-53

# List the start up tasks. Learn more: https://www.gitpod.io/docs/configure/workspaces/tasks
tasks:
  - name: Dotnet Run
    init: |  # runs during prebuild => https://www.gitpod.io/docs/configure/projects/prebuilds
      curl -fsSL https://download.visualstudio.microsoft.com/download/pr/f65a8eb0-4537-4e69-8ff3-1a80a80d9341/cc0ca9ff8b9634f3d9780ec5915c1c66/dotnet-sdk-3.1.201-linux-x64.tar.gz | tar xz -C /home/gitpod/dotnet
      dotnet restore

The key is using Ubuntu 20.02 (22 isn't supported AFAIK) and extracting binary to the /home/gitpod/dotnet directory.

Binaries Direct Link (Linux | x64): https://dotnet.microsoft.com/en-us/download/dotnet/3.1

Obviously will want to upgrade to 6/7 LTS but for now, needed to get it working without upgrading the repository.

@ghostdevv
Copy link

It's important to note that only stuff in the /workspace directory is saved, if you use prebuilds or your workspace stops then the dotnet install wouldn't be saved since it's in /home/gitpod/dotnet

@kamranayub
Copy link

@ghostdevv I was thinking of using a custom Dockerfile instead of the init; would that work / be cached across builds?

@ghostdevv
Copy link

Yea if you used a Dockerfile to install it then that would work just fine!

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

No branches or pull requests

3 participants