bchavez / Bogus

:card_index: A simple fake data generator for C#, F#, and VB.NET. Based on and ported from the famed faker.js.
Other
8.66k stars 495 forks source link

Analyzer in Visual Studio 2022 Not Generating Rules #404

Closed Ziebell-INL closed 2 years ago

Ziebell-INL commented 2 years ago

Version Information

Software Version(s)
Bogus NuGet Package 25.0.4
.NET Core? 6.0.101
.NET Full Framework?
Windows OS? Windows 10
Linux OS?
Visual Studio? 17.0.4

What locale are you using with Bogus?

U.S.A.

What is the expected behavior?

The Roslyn analyzer to generate and detect missing .RuleFor() rules at development & compile time works.

What is the actual behavior?

The Roslyn analyzer to generate and detect missing .RuleFor() rules at development & compile time does not work.

Please provide a stack trace.

NA

Any possible solutions?

Use Visual Studio 2019.

How do you reproduce the issue?

Create a new faker in Visual Studio 2022 does not generate rules.

Do you have a unit test that can demonstrate the bug?

No

Can you identify the location in Bogus' source code where the problem exists?

No

If the bug is confirmed, would you be willing to submit a PR?

No

Yes or No?

bchavez commented 2 years ago

Hi @Ziebell-INL, thank you for the bug report. I will try to take a look this weekend.

bchavez commented 2 years ago

Hi @Ziebell-INL; I tested the Bogus.Tools.Analyzer integration in Visual Studio 2022 and things seem to be working okay:

Untitled

image

I have a Bogus.Premium.Test project that is generally set up and ready to go to test the Bogus.Tools.Analyzer integration in Visual Studio 2022. Please follow the instructions in the README at https://github.com/bchavez/Bogus.Premium.Test and let me know if you continue to have a problem with the Bogus.Tools.Analyzer -- of course, this will require a paid license to work correctly; so assuming you have one; please let me know if you have trouble with the test project.

I'm going to close the issue for now, but feel free to continue the conversation so we can find out more about why things might not be working for you.

Additionally, I tested this with all project references and VS versions using the very latest versions.

Thanks, Brian