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

Support the binary option for .NET #4355

Merged
merged 2 commits into from
Apr 12, 2020
Merged

Conversation

mikhailshilkov
Copy link
Member

@mikhailshilkov mikhailshilkov commented Apr 10, 2020

The binary option was added to the Go plugin. Do the same for the .NET plugin.

Pulumi yaml example:

name: azure-cs
runtime:
    name: dotnet
    options:
        binary: netcoreapp3.1/Infra.dll
description: A minimal Azure C# Pulumi program

Resolves #3509

An error message if the given path is not found:

Diagnostics:
  pulumi:pulumi:Stack (azure-cs-dev):
    Could not execute because the specified command or file was not found.
    Possible reasons for this include:
      * You misspelled a built-in dotnet command.
      * You intended to execute a .NET Core program, but dotnet-netcoreapp3.1/Infra2.dll does not exist.
      * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
 
    error: an unhandled error occurred: Program exited with non-zero exit code: 1

I'm on the fence whether we should check the path ourselves. The standard error does give the name of the DLL and says it's not found, so I decided to keep it simple for now.

@mikhailshilkov
Copy link
Member Author

PR in docs: pulumi/docs#2906

@mikhailshilkov mikhailshilkov merged commit d3e7041 into master Apr 12, 2020
@pulumi-bot pulumi-bot deleted the mikhailshilkov/dotnet-binary branch April 12, 2020 19:34
abhinav pushed a commit to pulumi/pulumi-dotnet that referenced this pull request Jan 11, 2023
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

Successfully merging this pull request may close these issues.

Dotnet: adopt consistent approach for running programs across compiled languages
2 participants