dotnet / codeformatter

Tool that uses Roslyn to automatically rewrite the source to follow our coding styles
MIT License
1.24k stars 244 forks source link

Not able to run xunitconverter for VS2019 project #294

Open fenildesai opened 2 years ago

fenildesai commented 2 years ago

Hi, I am trying to convert multiple MS Test projects to xunit test project in Visual Studio 2019.

I have installed Build Tools for Visual Studio 2019. I tried to run command xunitconverter testproject file in the solution folder but get error: xunitconverter is not a recognized command. NOt sure what I Am missing here but I am not able to get how to run the xunitconverter.

Any help will be greatly appreciated.

tiesmaster commented 2 years ago

First of all, I'd recommend not to take the "vanilla" xunitconverter from this repo, as it's really outdated, and doesn't run/build anymore, AFAICT. I've forked it here, a while back, and got it up to speed, and working for latest .NET Framework, and .NET Core (it depends on what you're targetting, which one you need to pick: if your tests are .NET Framework, pick the one that is targetting that one, and vice versa).

Next, I don't fully understand the repro you're mentioning. You mention: "...xunitconverter is not a recognized command". What do you mean by that? Are you running this from the command-line, or do you have the source opened of of xunitconverter, and starting that from Visual Studio?

Finally, you mention Visual Studio 2019 a couple times, but that should be irrelevant. You should be able to open the xunitconverter solution from any recent VS (so VS 2017/2019/2022 should all work), and you shouldn't need don't need "Build Tools for Visual Studio 20xx".


Anyhow, let me know if this helps.