https://pulumi.com logo
Title
l

little-library-54601

12/06/2022, 2:24 PM
Folks, I started getting this error in a Github Action late yesterday.
Diagnostics:
199    pulumi:pulumi:Stack (grv-api-resources-grv-api-dev):
200      You must install or update .NET to run this application.
201      App: /home/runner/work/GeneralRV-API/GeneralRV-API/Devops/azure-environment/pulumi/grv-api-resources/bin/Debug/netcoreapp3.1/grv-api-resources
202      Architecture: x64
203      Framework: '<http://Microsoft.NETCore.App|Microsoft.NETCore.App>', version '3.1.0' (x64)
204      .NET location: /usr/share/dotnet
205      The following frameworks were found:
206        6.0.11 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
207        7.0.0 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Nothing about the action's dependence on .net core has changed since last week when it worked. I'll be looking into it shortly, but I thought someone here might be able to short-circuit my need to research. Is it possibly something as straightforward as a "uses" step within the job to explicitly reference a version of .net core?
b

bored-activity-40468

12/06/2022, 2:38 PM
Are you using dotnetcore3,1? The runners might not have it anymore and you may need to explicitly install it.
l

little-library-54601

12/06/2022, 2:39 PM
To my knowledge, I'm not explicitly using it. I don't have it installed locally, and the pulumi commands work locally.
b

bored-activity-40468

12/06/2022, 2:41 PM
Local you can see by dotnet —list-runtimes
What version is referenced in the csproj?
it looks like 3.1
/home/runner/work/GeneralRV-API/GeneralRV-API/Devops/azure-environment/pulumi/grv-api-resources/bin/Debug/netcoreapp3.1/grv-api-resource
probably need to update that version or add
- uses: actions/setup-dotnet@v3
  with:
    dotnet-version: '3.1.x'
The runners should still have 3.1.4 though
l

little-library-54601

12/06/2022, 2:53 PM
I'm using:
runs-on: ubuntu-latest
I'll add a "uses" of the setup-dotnet action. Weird that it's worked w/o warning or error for quite a while.
Really appreciate the feedback and responses.
b

bored-activity-40468

12/06/2022, 3:12 PM
it looks like ubuntu runners only have .net 6
strange
l

little-library-54601

12/06/2022, 3:21 PM
I guess my question is why that wouldn't work. Is there something about pulumi that demands .net core 3.1.x?
And if so, why don't I see the problem locally?
c

clever-sunset-76585

12/06/2022, 4:01 PM
You probably have 3.1 runtime installed locally. What was the output of running the command @bored-activity-40468 mentioned (https://pulumi-community.slack.com/archives/CQ2QFLNFL/p1670337692964999?thread_ts=1670336678.267089&amp;cid=CQ2QFLNFL)? Also see https://www.pulumi.com/blog/pulumi-targets-dotnet-6/#backward-compatibility, the .net 6 support announcement blog post from Pulumi. It seems that the cloud provider packages and the core Pulumi SDK are still targeting the 3.1 runtime for backwards compatibility.
l

little-library-54601

12/06/2022, 4:17 PM
I do have 3.1 installed locally - I had been looking at installed sdks.
i

icy-doctor-13719

12/06/2022, 4:20 PM
i use
- uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 6.x
in GH actions with no issue
l

little-library-54601

12/06/2022, 4:21 PM
Yeah - I already had that for building my app, just not for the Pulumi job. And no errors until today.
i

icy-doctor-13719

12/06/2022, 4:21 PM
it’s still erroring after adding that step?
l

little-library-54601

12/06/2022, 4:22 PM
It's fixed. Thanks all!!