Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation Error due to 'MessageOptions' Type Conflict between 'Google.Protobuf' and 'WireMock.Net' #1083

Open
iamzhaoxu opened this issue Mar 11, 2024 · 3 comments
Assignees
Labels

Comments

@iamzhaoxu
Copy link

iamzhaoxu commented Mar 11, 2024

Describe the bug

During the compilation of my project, an error arises because of a type conflict involving 'MessageOptions' originating from two distinct libraries: 'Google.Protobuf' and 'protobuf-net.Reflection'.

The project references both 'WireMock.Net' and 'Google.Protobuf'. Upon updating both libraries to version 1.5.49 for 'WireMock.Net' and version 3.25.3 for 'Google.Protobuf', this compilation error surfaces. The conflict emerges as 'WireMock.Net' starts utilizing 'protobuf-net.Reflection', thereby resulting in the existence of the 'MessageOptions' class within the same namespace in both libraries.

Expected behavior:

Compilation should proceed without errors, ensuring the successful build of the project.

Test to reproduce

Ensure project references 'WireMock.Net' and 'Google.Protobuf'.
Update 'WireMock.Net' to version 1.5.49 and 'Google.Protobuf' to version 3.25.3.
Attempt to compile the project.
Encounter the error message due to the type conflict with 'MessageOptions'.
Screenshot 2024-03-11 110549

@iamzhaoxu iamzhaoxu added the bug label Mar 11, 2024
@StefH StefH self-assigned this Mar 20, 2024
@StefH
Copy link
Collaborator

StefH commented Mar 20, 2024

@iamzhaoxu

Can you please provide an example project?

Because I cannot reproduce this problem. I also have a unit test project which uses both:

@StefH
Copy link
Collaborator

StefH commented Apr 2, 2024

@iamzhaoxu
Can you please provide an example project ?

@StefH
Copy link
Collaborator

StefH commented May 13, 2024

@iamzhaoxu
Can you please provide an example project which shows this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants