pulumi/sdk/dotnet/Pulumi
Justin Van Patten 1a6897ba26
Better error message when trying to use dotnet run (#3479)
After creating an initial Pulumi .NET project, it will be natural for some folks (who are unfamiliar with Pulumi) to try to run it via `dotnet run`, as that's how you'd typically run a .NET Core program. Doing so today fails with:

```
Unhandled exception. System.InvalidOperationException: Environment did not contain: PULUMI_MONITOR
   at Pulumi.Deployment..ctor()
   at Pulumi.Deployment.RunAsync(Func`1 func)
   at Pulumi.Deployment.RunAsync(Func`1 func)
   at Pulumi.Deployment.RunAsync(Action action)
   at Program.Main() in /Users/user/temp/quickstart/Program.cs:line 9
   at Program.<Main>()
```

Instead, provide a more descriptive error message indicating that the pulumi CLI should be used to run the program. We return the same error as we do for Node.js and Python.

```
Unhandled exception. System.InvalidOperationException: Program run without the Pulumi engine available; re-run using the `pulumi` CLI
   at Pulumi.Deployment..ctor()
   at Pulumi.Deployment.RunAsync(Func`1 func)
   at Pulumi.Deployment.RunAsync(Func`1 func)
   at Pulumi.Deployment.RunAsync(Action action)
   at Program.Main() in /Users/user/temp/quickstart/Program.cs:line 9
   at Program.<Main>()
```
2019-11-09 17:05:24 +00:00
..
Core Fix null ref. Add Tuple overloads up to 8 params. (#3471) 2019-11-07 23:58:23 -08:00
Deployment Better error message when trying to use dotnet run (#3479) 2019-11-09 17:05:24 +00:00
Exceptions Add **preview** .NET Core support for pulumi. (#3399) 2019-10-25 16:59:50 -07:00
Resources Simplify dotnet resource options (#3411) 2019-10-28 14:01:36 -07:00
Serialization Don't read a resource if the Id we got was null or empty. (#3410) 2019-10-27 00:06:16 -07:00
AssemblyAttributes.cs Add **preview** .NET Core support for pulumi. (#3399) 2019-10-25 16:59:50 -07:00
Config.cs Add **preview** .NET Core support for pulumi. (#3399) 2019-10-25 16:59:50 -07:00
Config_Exceptions.cs Add **preview** .NET Core support for pulumi. (#3399) 2019-10-25 16:59:50 -07:00
Extensions.cs Add **preview** .NET Core support for pulumi. (#3399) 2019-10-25 16:59:50 -07:00
Log.cs Add **preview** .NET Core support for pulumi. (#3399) 2019-10-25 16:59:50 -07:00
PublicAPI.Shipped.txt Add **preview** .NET Core support for pulumi. (#3399) 2019-10-25 16:59:50 -07:00
PublicAPI.Unshipped.txt Fix null ref. Add Tuple overloads up to 8 params. (#3471) 2019-11-07 23:58:23 -08:00
Pulumi.csproj Add **preview** .NET Core support for pulumi. (#3399) 2019-10-25 16:59:50 -07:00
Stack.cs Add **preview** .NET Core support for pulumi. (#3399) 2019-10-25 16:59:50 -07:00