wooden-animal-34285
02/11/2022, 11:49 AMMicrosoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 398.46 ms for /home/secustor/repos/pulumi-exoscale/sdk/dotnet/Pulumi.Exoscale.csproj.
Config/Config.cs(49,31): error CS0542: 'Config': member names cannot be the same as their enclosing type [/home/secustor/repos/pulumi-exoscale/sdk/dotnet/Pulumi.Exoscale.csproj]
Build FAILED.
Config/Config.cs(49,31): error CS0542: 'Config': member names cannot be the same as their enclosing type [/home/secustor/repos/pulumi-exoscale/sdk/dotnet/Pulumi.Exoscale.csproj]
0 Warning(s)
1 Error(s)
I know that this error can come from resource names, but I do not have any resource which is called Config
. I guess it is referencing the attribute of ProviderInfo
with the same name? https://github.com/secustor/pulumi-exoscale/blob/implement_baseline/provider/resources.go#L76
My repo is based on https://github.com/pulumi/pulumi-tf-provider-boilerplate
Thanks for your help in advance!broad-dog-22463
02/15/2022, 7:05 PMwooden-animal-34285
02/15/2022, 7:40 PMstocky-restaurant-98004
02/18/2022, 4:53 PM## "Member names cannot be the same as their enclosing type"
```text
error CS0542: 'ApiKey': member names cannot be the same as their enclosing type [/Users/guin/go/src/github.com/pulumi/pulumi-artifactory/sdk/dotnet/Pulumi.Artifactory.csproj]
Solution: C# does not allow class/struct member names to the same as their enclosing type, e.g. a class named Foo
cannot also have a member Foo
. In this case, add an override to resources.go
like:
go
"aws_appsync_domain_name": {
Tok: awsResource(appsyncMod, "DomainName"),
Fields: map[string]*tfbridge.SchemaInfo{
"domain_name": {
CSharpName: "Name",
},
},
},
```
wooden-animal-34285
02/21/2022, 9:38 AMerror CS1061: 'Config' does not contain a definition for 'GetDouble' and no accessible extension method 'GetDouble' accepting a first argument of type 'Config' could be found
It seems like Pulumi does not generate a Getter function for it.
I can skip this by overwriting the type, but I'm not sure if this will prevent the usage down the line.
Config: map[string]*tfbridge.SchemaInfo{
"config": {
CSharpName: "CloudstackConfig",
},
"timeout": {
Type: "string",
},
},
Is this a known issue?
Thanks!stocky-restaurant-98004
02/22/2022, 1:55 PMwooden-animal-34285
02/22/2022, 2:09 PM