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

/usr/share/dotnet/sdk/6.0.202/Roslyn/Microsoft.CSharp.Core.targets(75,5) #7434

Open
paul-cheung opened this issue May 8, 2022 · 2 comments
Labels
area-setup Issues related to installing .NET Core

Comments

@paul-cheung
Copy link

paul-cheung commented May 8, 2022

I am using the gitpod to build my project on github, the workspace image based on Ubuntu 20.04.
Dotfiles i am using to install the dotnet sdk was like: install dotnet sdk

Now it failed to build
gitpod /workspace/myproject (main) > dotnet build
/usr/share/dotnet/sdk/6.0.202/Roslyn/Microsoft.CSharp.Core.targets(75,5): error MSB6004: The specified task executable location "/run/containerd/io.containerd.runtime.v2.task/k8s.io/cb2b4159045b836c6bc7e28d0e8b48a396ada2dc020f01599bce0eb0f55d6d6a/rootfs/usr/share/dotnet/dotnet" is invalid. [/workspace/myproject/src/Common/myproject.Common.csproj]

I have tried the solution mentioned here, but it did not help

For some reasons, I did NOT want to add .gitpod.yml file in my repository like this (workspace-dotnet base image which was specified in .gitpod.yml)

@MihaZupan MihaZupan added the area-setup Issues related to installing .NET Core label May 9, 2022
@zlzforever
Copy link

zlzforever commented Jul 26, 2022

Maybe the issue cause by mount image files. There is a workaround:

image

image

I don't know why in the repo folder execute dotnet command, then used "/rootfs/usr/share/dotnet/dotnet".

Follow this, i build a new image and it works

`
FROM mcr.microsoft.com/dotnet/sdk:6.0

RUN ln -s / /rootfs
`

@bmartin5263
Copy link

@zlzforever Thank you, this fixed my issue where I have been trying to run dotnet test within a Concourse task using the image mcr.microsoft.com/dotnet/sdk. It kept failing with the following error:

Failed to launch testhost with error: System.IO.FileNotFoundException: Path does not exist: /rootfs/usr/share/dotnet/dotnet (http://localhost:8080/#L647440ac:9)
File name: '/rootfs/usr/share/dotnet/dotnet'

Adding the following worked perfectly.

mkdir -p /rootfs/usr/share/dotnet
ln -s /usr/share/dotnet/dotnet /rootfs/usr/share/dotnet
dotnet test

Sharing in case anyone else out there searching for a fix for that error message may come across this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-setup Issues related to installing .NET Core
Projects
None yet
Development

No branches or pull requests

4 participants