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

Nuget reference to xunit prevents from using it with xunit.assert.source #649

Closed
Chaosflo opened this issue Sep 12, 2022 · 6 comments
Closed
Labels
Milestone

Comments

@Chaosflo
Copy link

Note: New issues raised, where it is clear the submitter has not read the issue template, are likely to be closed with "please read the issue template". Please don't take offense at this. It is simply a time management decision. If someone raises an issue, and can't be bothered to spend the time to read the issue template, then the project maintainers should not be expected to spend the time to read the submitted issue. Often too much time is spent going back and forth in issue comments asking for information that is outlined in the issue template.

Preamble

General questions may be better placed StackOveflow.

Where relevant, ensure you are using the current stable versions on your development stack. For example:

Any code or stack traces must be properly formatted with GitHub markdown.

Describe the bug

Hello there!
When I combine Verify.Xunit with xunit.assert.source package, the Assert class results in a conflict.

If you don't know, this packages allows you to define custom assert which is needed by our project.

This problem is in many repositories and there is an easy fix normally by simply reducing the nuget references.

Is it possible that the xunit.assert reference could be removed?
If not, would it be possible to use the xunit.assert.source package instead?

Minimal Repro

Simply install xunit.assert.source and Verify.Xunit package in one project

Submit a PR that fixes the bug

Submit a Pull Request (PR) that fixes the bug. Include in this PR a test that verifies the fix. If you were not able to fix the bug, a PR that illustrates your partial progress will suffice.

@SimonCropp
Copy link
Member

can u push up a repro of this to a github repository

@Chaosflo
Copy link
Author

Its not that difficult, simply make a solution with XUnit Test and add the xunit.assert.source package

@SimonCropp SimonCropp added this to the 18.0.0 milestone Sep 14, 2022
@SimonCropp SimonCropp added the Bug label Sep 14, 2022
@SimonCropp
Copy link
Member

can u try 18.0.0-beta.18

@Chaosflo
Copy link
Author

Aww nice one!!!!

Really cool many thanks

@tom-englert
Copy link
Contributor

That works great, even with older Verify versions, you just have to suppress CS0436:

[*.cs]
# CS0436: Type conflicts with imported type
dotnet_diagnostic.CS0436.severity = none

So no need to break other projects

@tom-englert
Copy link
Contributor

TestProject1.zip

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

No branches or pull requests

3 participants