You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the OperatorSDK is not generating when building using MSBUILD:
C:\src\neonKUBE\Services\neon-cluster-operator\OperatorStartup.cs(91,18): error CS1061: 'IServiceCollection' does not contain a definition for 'AddKubernetesOperator' and no accessible extension method 'AddKubernetesOperator' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) [C:\src\neonKUBE\Services\neon-cluster-operator\neon-cluster-operator.csproj]
C:\src\neonKUBE\Services\neon-cluster-operator\OperatorStartup.cs(105,17): error CS1061: 'IApplicationBuilder' does not contain a definition for 'UseKubernetesOperator' and no accessible extension method 'UseKubernetesOperator' accepting a first argument of type 'IApplicationBuilder' could be found (are you missing a using directive or an assembly reference?) [C:\src\neonKUBE\Services\neon-cluster-operator\neon-cluster-operator.csproj]
I've noticed that when I open the NEONCLOUD solution with :\src\neonKUBE\Services\neon-cluster-operator\OperatorStartup.cs open that it takes sometime for the call to UseKubernetesOperator() there turns blue, indicating that the method has been generated and is actually valid. I also notice that the code is generated in a user temp directory and not in a git folder, so we can't rely on source files generated previously in a VS session that gets committed to GitHub.
I wonder if there's a way to have MSBUILD run all analyzers before building?
The text was updated successfully, but these errors were encountered:
I upgraded the Roslyn nuget analyzer references last week during my Reno vacation so all of the referenced versions would be the same and I was working after that on upgrading 80+ other nuget packages and then working on fixing unit tests, so I didn't actually try rebuilding the NEONKUBE release until yesterday, and then ran into this.
TLDR: MSFT has a fundamental conflict between Rosyln compiler and SDK versions that can cause analyzer version dependency versions. Apparently, this wasn't a huge problem in the past when mostly only MSFT was shipping analyzers but is a bigger problem now that other folks are doing this (like us).
MSFT claims to have fixed this (after .NET CORE SDK v17.4?). We're not seeing any version conflicts though, so I'm not sure this is relevant.
I see that there's a compiler warning that I've updated the Roslyn package references to v.4.7.0 where as the current compiler is only at v4.5.0. I'm going to revert our references to v4.5.0 and see what happens.
What's interesting about this is that build script is able to complete the full build but fails when building the container images. The container image builds, build the service csproj files individually (not as part of the solution).
It appears that the OperatorSDK is not generating when building using MSBUILD:
I've noticed that when I open the NEONCLOUD solution with :\src\neonKUBE\Services\neon-cluster-operator\OperatorStartup.cs open that it takes sometime for the call to
UseKubernetesOperator()
there turns blue, indicating that the method has been generated and is actually valid. I also notice that the code is generated in a user temp directory and not in a git folder, so we can't rely on source files generated previously in a VS session that gets committed to GitHub.I wonder if there's a way to have MSBUILD run all analyzers before building?
The text was updated successfully, but these errors were encountered: