Cake.Recipe icon indicating copy to clipboard operation
Cake.Recipe copied to clipboard

Switch to .Net Global Tool for JetBrains tools

Open gep13 opened this issue 5 years ago • 4 comments

As per docs here:

https://www.jetbrains.com/help/resharper/ReSharper_Command_Line_Tools.html#install-and-use-resharper-command-line-tools-as-net-core-tools

gep13 avatar Sep 14 '20 20:09 gep13

This may require upstream changes in Cake to support. If I remember correctly, DupFinder and InspectCode is provided from Cake itself and not an addin. Alternatively, an addin may perhaps be created to consolidate the calling since it will need to call the same executable every time (not completely sure about this one).

AdmiringWorm avatar Sep 14 '20 21:09 AdmiringWorm

Just to follow up with the above...

In the .Net Global Tool version of the JetBrains tools, there is a new command jb which will then invoke either jb dupfinder or jb inspectcode. So it isn't a straight call to dupfinder or inspectcode, those actually need to be provided as an argument to the jb command.

Off the top of my head, I am not sure how best to handle this...

gep13 avatar Sep 15 '20 19:09 gep13

Re-opening this issue for now, since there are problem running the global tool on Linux, and also the suggestions is to create a new Cake.JetBrains addin, rather than trying to force the existing DupFinder and InspectCode aliases to use the new global tool.

gep13 avatar Sep 28 '20 20:09 gep13

For reference: here is the issue regarding DupFinder

Warning: While cataloging the assembly “JetBrains.Platform.MsBuildAutoDetectTask, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
Warning: While cataloging the assembly “JetBrains.Platform.MsBuildAutoDetectTask, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
Warning: While cataloging the assembly “JetBrains.Platform.MsBuildTask, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
Warning: While cataloging the assembly “JetBrains.Platform.MsBuildTask, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
Warning: While cataloging the assembly “JetBrains.ReSharper.Features.Internal, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
Warning: While cataloging the assembly “JetBrains.CommandLine.Products, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
Warning: While cataloging the assembly “JetBrains.CommandLine.InspectCode.MsBuild, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
JetBrains Duplicates Finder 2020.2.2
Running in 64-bit mode, .NET runtime 3.1.8 under Unix 5.4.0.1025
Using toolset version 16.0 from /usr/share/dotnet/sdk/3.1.402
Collecting files to analyze:
  from project '/home/runner/work/Cake.Transifex/Cake.Transifex/Cake.Transifex.sln'.
23 files found to analyze.
Duplicates report was written to /tmp/tmpGcXl2k.tmp
An error occurred when executing task 'DupFinder'.

https://github.com/cake-contrib/Cake.Transifex/runs/1159059895?check_suite_focus=true#step:6:1113

There are a few possible problems that cause the above error

  1. There is a mistake from the developers, and they have marked the dependencies as private
  2. The executable must be executed with dotnet jb instead of dotnet-jb. This means it needs to be installed as a proper tool, and not to the tools directory (which causes cake to not find it :( )
  3. There is a hard requirement on the .NET Core runtime being used (unlikely)

AdmiringWorm avatar Sep 28 '20 20:09 AdmiringWorm