ReSharper command-line tools cross platform w\Xamarin

I have a Xamarin.Forms project that targets iOS.  I'm wanting to run the ReSharper analysis on the mac build agent.  I see that Jetbrains has released a cross-plat toolset.

Following the instructions here, I installed the toolset on my mac.

When I try to run inspect code, it doesn't work.  It looks like it is pulling the toolset from the wrong location.

 

So, I tried forcing mono and the toolset path:

 

As you can see, this doesn't work either.

 

Any help would be appreciated.

 

TIA

0
15 comments
Official comment

Hi Andy!

Mono parameter should point to executable, not directory.
Also, toolset path is not necessary when mono is specified.

Take a closer look at command line tool's parameters
https://www.jetbrains.com/help/resharper/InspectCode.html#inspection-parameters 

Thanks Slava.

You're right, I missed the mono exe.  So I tried it again, but was unsuccessful.

If you're telling me I don't need to set the toolset path, I'm not sure what other options I need to be setting here to make this work.

Thanks

0

Okay then, auto-detection didn't work.
Better to file an issue in youtrack.
And, what if you'd specify mono and toolset both? Does it help?

0

So, is filing the issue in youtrack something I need to do?

0

Yes please.
Repro project will be very useful.
Also, OS type and version, Mono version and other details.

0

Before filing the issue - why so strange path to msbuild executable?
It should be in the same folder as mono executable itself.

0

How do you build you project under Mono?
There should be path to correct msbuild.

0

I pulled that path from my build pipeline for when it actually builds the solution.  It does reside there:


However, it looks like it does actually live in the mono bin directory as well.  I went ahead and tried it pointing it to the mono directory.

0

Are you sure it resides there? Error message says it's not.
You should be able to execute %path_to_mono% %path_to_msbuild%.
What that command's output says?

 

0

But there is no Commands part in msbuild path while in your example with inspectcode there is...

0

But, msbuild and mono does reside in both places.  I haven't mucked with any of this, this is how it was setup after installing VS for mac.

But, as you pointed out, looks like I left commands in one of the earlier attempts.  Oops.  Here it is without.


0

toolset-path should point to actual msbuild dll which mono can execute, not to a shell script. Something like:

/Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/MSBuild.dll

0

Ok, that's helpful.

 

It seems

--toolset-path=/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/Current/bin/MSBuild.dll 

does the trick.  Thanks!

0

Please sign in to leave a comment.