Open paul-cheung opened 2 years ago
Maybe the issue cause by mount image files. There is a workaround:
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 `
@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.
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)