JetBrains.ReSharper.CommandLineTools in Rider

Answered

Hi Rider Team,

 

we are trying to automate some code inspection. We would love to use Resharper code inspection for this. Most of us use Rider and I would like to know how to get the Resharper CLT running on macOS. When I add the Nuget package "JetBrains.ReSharper.CommandLineTools" to our project and add this AfterBuild step:

<Target Name="AfterBuild">
<Message Text="Running Resharper CLT..." />
<InspectCode SolutionFile="..\ResharperCLINugetTest.sln"
IncludedProjects="ResharperCLINugetTest"/>
</Target>

Then Rider just throws errors when performing the InspectCode step. Can somebody please tell me if this is just not supported yet or are we doing something wrong?

 

Log:

https://pastebin.com/yxmL7Mvu

 

2
8 comments
Avatar
Permanently deleted user

Hi Robin, I know this post is very old. Just wondering if you were able to resolve this issue? If you were able to work around it, would you be able to explain how you went about it?

0

@... Hi! Are you getting the same error as in the original message? What CLT version are you trying to use?

Have you tried using the latest 2019.3.4 version?

0
Avatar
Permanently deleted user

Hi Maria Pleskunina,

2019.3.4 is not for the ReSharper CLT Nuget package. That version is for the independent CLT.

The latest version for the ReSharper CLT Nuget package is 2020.1.0-eap08 which I have tried using.

The error I get after adding the build target is not the same as above. However, the reason I made the comment above is that I was looking for any sort of help to get this working. I managed to get the build target to execute now, but I get an error saying "Process finished with exception RequireSTAThread".

The code I am using in MyProject.csproj to set up the build step is as follows:

<Target Name="RunMyReSharper" BeforeTargets="AfterBuild">
<Message Text="Running Resharper CLT..." />
<InspectCode SolutionFile="/absolute/path/to/solution.sln"
IncludedProjects="MyProject"/>
</Target>
0

Hi @...,

Thanks for the reply!

The following ticket looks similar to your problem: https://youtrack.jetbrains.com/issue/RSRP-470109. Initially, the ticket was created for VS+ReSharper on Windows, but it seems there is the same problem with Rider on Mac (we reproduced "Process finished with exception RequireSTAThread" error).

Is it an option for you to try the standalone InspectCode CLT on Mac?

0
Avatar
Permanently deleted user

Yes, we have decided to use the standalone InspectCode CLT for now.

I am now following the ticket mentioned. Thanks for the info!

0

Thanks for the update! Please feel free to contact us in case of any other questions. Have a great day!

0
Avatar
Permanently deleted user

Hi :)

Sorry for not updating. We could not find a way to work around this issue except using the CLT on Windows. Then at some glorious moment JetBrains release the CLT for macOS and Linux so we now use these tools on our build servers directly. This issue has been resolved because we don't nee the nuget package for this.

 

Cheers,

 

Robin

0

@... thanks for the update! It's great to hear that now everything works fine for you :)

 

0

Please sign in to leave a comment.