© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•8mo ago
ewilliams

Code Generator Broke after VS Update

I have a code generate that seems to be completly waked out inside of VS. I believe this is an issue with Visual Studio however Rider is behaving the same way. Basically the code generator is running and creating the 'files', I can even build so the compiler is fine. The output assembly even includes the generated types. However the IDE is not treating the types as if they are part of the same assembly. Example, a partial class defined in my consuming project with a generated partial class has no partial members. The type is generated, the names match, the namespaces match, but the IDE is treating it like a different class all together. As I play around more and more I'm able to make these warning disapear but doing strange things like deleting the partial methods and re-writing them. Another example, I have a generated property IpAddress address that can't be accessed in the consuming type but exists in the partial type. As soon as I delete and re-write the reference it works fine. see the gif attached for an example. using VS Version 17.14.7 with "Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0" "Microsoft.CodeAnalysis.CSharp" Version="4.14.0" and "Microsoft.CodeAnalysis.Analyzers" Version="4.14.0".
class.PNG
code_gen.gif
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

issues with code generator
C#CC# / help
10mo ago
✅ VS Code
C#CC# / help
2y ago
Source Generator Auto Update Extension
C#CC# / help
3y ago