worried-city-86458
04/28/2021, 6:34 AMSystem.MissingMethodException: Method not found: 'Void YamlDotNet.Core.Events.MappingStart..ctor(System.String, System.String, Boolean, YamlDotNet.Core.Events.MappingStyle)'.
at Pulumi.Automation.Serialization.Yaml.ProjectRuntimeYamlConverter.WriteYaml(IEmitter emitter, Object value, Type type)
at YamlDotNet.Serialization.ObjectGraphVisitors.CustomSerializationObjectGraphVisitor.Enter(IObjectDescriptor value, IEmitter context)
at YamlDotNet.Serialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[[TContext]](Object name, IObjectDescriptor value, IObjectGraphVisitor`1 visitor, TContext context, Stack`1 path)
at YamlDotNet.Serialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties[[TContext]](IObjectDescriptor value, IObjectGraphVisitor`1 visitor, TContext context, Stack`1 path)
at YamlDotNet.Serialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[[TContext]](IObjectDescriptor value, IObjectGraphVisitor`1 visitor, TContext context, Stack`1 path)
at YamlDotNet.Serialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[[TContext]](Object name, IObjectDescriptor value, IObjectGraphVisitor`1 visitor, TContext context, Stack`1 path)
at YamlDotNet.Serialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.YamlDotNet.Serialization.IObjectGraphTraversalStrategy.Traverse[[TContext]](IObjectDescriptor graph, IObjectGraphVisitor`1 visitor, TContext context)
at YamlDotNet.Serialization.SerializerBuilder.ValueSerializer.SerializeValue(IEmitter emitter, Object value, Type type)
at YamlDotNet.Serialization.Serializer.EmitDocument(IEmitter emitter, Object graph, Type type)
at YamlDotNet.Serialization.Serializer.Serialize(IEmitter emitter, Object graph)
at YamlDotNet.Serialization.Serializer.Serialize(TextWriter writer, Object graph)
at YamlDotNet.Serialization.Serializer.Serialize(Object graph)
at Pulumi.Automation.Serialization.LocalSerializer.SerializeYaml[[T]](T object) in LocalSerializer.cs:41
at Pulumi.Automation.LocalWorkspace.SaveProjectSettingsAsync(ProjectSettings settings, CancellationToken cancellationToken) in LocalWorkspace.cs:419
at Pulumi.Automation.LocalWorkspace.InitializeProjectSettingsAsync(ProjectSettings projectSettings, CancellationToken cancellationToken) in LocalWorkspace.cs:355
at Pulumi.Automation.LocalWorkspace.CreateStackHelperAsync(InlineProgramArgs args, Func`4 initFunc, CancellationToken cancellationToken) in LocalWorkspace.cs:275
at Pharos.Gemini.DeployCommand.ExecuteAsync(CommandContext context, Settings settings)
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings)
{
try
{
var deployedResources = OrderedResources.Where(resource => settings.Resources.HasFlag(resource));
foreach (var resource in deployedResources)
{
var info = ResourceInfoMap[resource];
Logger.LogDebug($"Deploying {info.ProjectName}...");
var stackName = $"{settings.Organization.ToLower()}/{settings.Environment.ToString().ToLower()}";
var stackArgs = new InlineProgramArgs(info.ProjectName, stackName, info.Program);
var stack = await LocalWorkspace.CreateOrSelectStackAsync(stackArgs);
foreach (var plugin in info.Plugins)
{
var pluginArgs = plugin.Split(" ");
await stack.Workspace.InstallPluginAsync(pluginArgs[0], pluginArgs[1]);
}
//await stack.SetConfigAsync("aws:region", new ConfigValue("us-east-1")); //TODO
await stack.RefreshAsync(new RefreshOptions { OnStandardOutput = AnsiConsole.WriteLine });
var result = await stack.UpAsync(new UpOptions { OnStandardOutput = AnsiConsole.WriteLine });
if (result.Summary.ResourceChanges != null)
{
AnsiConsole.WriteLine("Summary:");
foreach (var (key, value) in result.Summary.ResourceChanges)
{
AnsiConsole.WriteLine($" {key}: {value}");
}
}
Logger.LogDebug($"Deployed {info.ProjectName}");
}
return 0;
}
catch (Exception ex)
{
AnsiConsole.WriteException(ex, ExceptionFormats.ShortenPaths);
return -1;
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AssemblyName>gemini</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebuggerSupport>false</DebuggerSupport>
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
<EventSourceSupport>false</EventSourceSupport>
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
<IncludeNativeLibrariesForSelfExtract>false</IncludeNativeLibrariesForSelfExtract>
<InvariantGlobalization>true</InvariantGlobalization>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<TrimMode>Link</TrimMode>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Aws\Aws.csproj" />
<ProjectReference Include="..\Kubernetes\Kubernetes.csproj" />
<ProjectReference Include="..\Library\Library.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="2.1.0" />
<PackageReference Include="Pulumi.Automation" Version="3.1.0" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="4.1.2" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Seq" Version="5.0.1" />
<PackageReference Include="Spectre.Console" Version="0.39.1-preview.0.7" />
</ItemGroup>
<ItemGroup>
<None Update="config.Development.yml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="config.yml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
prehistoric-coat-10166
04/28/2021, 7:02 AMworried-city-86458
04/28/2021, 7:41 AMYamlDotNet
11.1.1
. I changed it to 9.1.0
and it worked.9.1.4
and 10.0.0
work. 10.1.0
does not work.prehistoric-coat-10166
04/28/2021, 8:33 AMworried-city-86458
04/28/2021, 8:45 AMPulumi.Automation
passes null for both anchor and tags.
Updating it to YamlDotNet
11.1.1
compiles without any issues.YamlDotNet
to latest?prehistoric-coat-10166
04/28/2021, 9:16 AMworried-city-86458
04/28/2021, 9:25 AMtall-librarian-49374
04/28/2021, 9:52 AMbored-oyster-3147
04/28/2021, 1:34 PMworried-city-86458
04/28/2021, 6:01 PMbored-oyster-3147
04/29/2021, 1:49 PMworried-city-86458
05/02/2021, 2:11 AMbored-oyster-3147
05/02/2021, 8:14 PMworried-city-86458
05/03/2021, 12:48 AMbored-oyster-3147
05/03/2021, 1:54 AMmake
installed.. I’m pretty strictly dotnet at the moment 😅