Thoroughbreed / CryptoChat

End-to-end encrypted chat software via gRPC
Apache License 2.0
0 stars 0 forks source link

Random build error (non-static class claimed static) #3

Open jaa2019 opened 2 years ago

jaa2019 commented 2 years ago

From time to time, VS will claim that the server-class ChatRoom is static, however it isn't.

I haven't found the bug, but I suspect it's the Protobuf generated class that somehow identifies itself as static.

It's easily fixed tho if VS thinks it's static - just select the code-fix "Make class ChatRoom non-static" and it will build.

ZhakalenDk commented 2 years ago

Interesting issue 🤔

Does it actually change the class to static or is it simply IntelliSense acting up?

jaa2019 commented 2 years ago

Somehow, the compiler generated code for gRPC creates a class, which is in fact a static class (as you can see in the screenshots)

I've tried to look at gRPC, but I cannot seem to find why it's static - and it doesn't make any sense either. Just change it to a non-static class and it builds just fine. It only happens if you clean the solution and builds from scratch.

Skærmbillede 2022-01-31 kl  09 50 07 Skærmbillede 2022-01-31 kl  09 50 21 Skærmbillede 2022-01-31 kl  09 50 43