Issue: protobuf-net.BuildTools Not Generating C# from .proto in WPF .NET 8.0 Project
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Issue:-protobuf-netBuildTools-Not-Gener/10945475)._
---
Environment:
Project type: WPF (.NET 8.0)
Using protobuf-net v3.2.56 and protobuf-net. BuildTools v3.2.52 via NuGet
proto file placed under Protos\messages.proto
Visual Studio 2022 (latest version)
I dunno whats wrong, my .csproj includes:
```
<ItemGroup>
<Protobuf Include="Protos\messages.proto" ProtoRoot="Protos" />
<AdditionalFiles Include="Protos\messages.proto" />
</ItemGroup>
```
I also set Build Action = C# analyzer additional file in the properties for messages.proto, no build errors from the generator, but no generated .cs appears under obj/Debug/net8.0-windows/protobuf-net/; I confirmed that protobuf-net. BuildTools is installed and referenced properly.
Any idea why source generator isn't running?
are there specific limitations for WPF or .NET 8 SDK-style projects? is there a known workaround for forcing code generation in such cases?
Thanks!
---
### Original Comments
#### Ankit Virdi on 7/31/2025, 04:44 PM:
I checked the documentation for Protobuf, it doesnt mention .NET 8.00 so I tried it with 6.0 Framework, didn’t work? I should probably redo the whole project from scratch in a .NET 6.0 template?
#### Feedback Bot on 8/1/2025, 05:22 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Contributor guide
Assessment
This issue has not been assessed yet.