https://pulumi.com logo
Title
m

mysterious-australia-14256

01/20/2023, 12:07 PM
I am trying to update a pulumi project from netcoreapp3.1 to net6.0. When I do this, clear out the bin and obj folders, and do a pulumi preview, the build runs Ok but then I am getting the following
error: an unhandled error occurred: Program exited with non-zero exit code: 3762504530

    Unhandled exception. System.BadImageFormatException: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Format of the executable (.exe) or library (.dll) is invalid.
    File name: 'Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
       at Pulumi.Deployment..ctor(RunnerOptions runnerOptions)
       at Pulumi.Deployment.<>c__111`1.<RunAsync>b__111_0()
       at Pulumi.Deployment.CreateRunnerAndRunAsync(Func`1 deploymentFactory, Func`2 runAsync)
       at Program.<Main>()
anyone have any suggestion on how to resolve this?
e

echoing-dinner-19531

01/21/2023, 1:34 PM
Can you "dotnet run" the project without pulumi (it won't work, Deployment.Run will error about no engine, but will test that the binaries are executable)
g

gray-summer-24175

03/14/2023, 7:16 PM
can you share your csproj? my base csproj looks something like this (i've upgraded to net7)