Coder Social home page Coder Social logo

Comments (14)

alanwales avatar alanwales commented on July 18, 2024 1

As far as I am aware the Resharper CLT only works on Windows machines with the correct dependencies installed:

https://resharper-support.jetbrains.com/hc/en-us/community/posts/360000018359-ReSharper-CLT-on-Linux

I have always used the Hosted VS2017 agent on Azure Devops and never had issues. I suspect a lot of the 1* reviews are using self-hosted agents without the required dependencies installed or even Linux agents... but due to the volume of bad reviews I gave up supporting this extension a while ago.

Basically whatever the Resharper CLT requires will work with this task as it’s just a wrapper around it with Powershell (not Powershell Core, it wouldn’t work anyway as a wrapper because the Resharper CLT is not cross-platform).

I would advise anyone to switch in the long-run to the .editorconfig rules. This is not yet supported on CI systems but I have seen a Github work item which says this is in progress. It’s about time Visual Studio decoupled code style rule enforcement from the IDE but it’s not here yet.

I am using Rider at the moment but plan to switch back to Visual Studio when the native refactoring capabilities gets to the same level (not the case with VS 2019). Also JetBrains were rather draconian with their copyright enforcement for this task so that’s another reason I had enough of supporting it.

.editorconfig is the future so please check it out

https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2019

from vsts-resharper-code-quality-task.

lennartb- avatar lennartb- commented on July 18, 2024

Same issue here, began to happen on June 21st.

System.Management.Automation.ItemNotFoundException: Der Pfad "C:\agent\_work\6\a\JetBrains.ReSharper.CommandLineTools.2018.1.2\tools\Reports\CodeInspection_7382.xml" kann nicht gefunden werden, da er nicht vorhanden ist.

from vsts-resharper-code-quality-task.

lennartb- avatar lennartb- commented on July 18, 2024

Seems to be solved with installing the .NET Core workload for the Build Tools on the agent. Running the inspectcode.exe call locally with the arguments supplied by the logging output gave me the actual error.

from vsts-resharper-code-quality-task.

bobvandevijver avatar bobvandevijver commented on July 18, 2024

So, apparently this is caused by VSTS (powershell?) checking the given path to rigiously: it expects that path gives as arguments in the Start-Process call are all existent. This means it isn't necessarily related to this plugin, but it might be possible to solve it in the script.

Anyways, for now we've added a simple bash script, which creates the output file before running the analysis task.

So, the Bash script, run in $(Common.TestResultsDirectory)

touch resharper_analysis.xml

with $(Common.TestResultsDirectory)\resharper_analysis.xml as "Results output file path" in this plugin works.

from vsts-resharper-code-quality-task.

bobvandevijver avatar bobvandevijver commented on July 18, 2024

So, the solution above worked, but stopped working about 3 weeks ago (without any changes from my end).

However, Jetbrains has made now made a statement: the tooling requires MSBuildTools to be installed, which I did not have. See:

For now, I've solved it for my dotnet core 2.1 project by using the "Hosted VS2017" agent, with the steps below:

screen shot 2018-09-26 at 10 16 44

from vsts-resharper-code-quality-task.

SantGitHub0802 avatar SantGitHub0802 commented on July 18, 2024

Hi Team,
I am using .Net desktop application and Hosted VS2017 as agent. It is throwing the same type of error "ItemNotFoundException for CodeInspection_9.xml file" in Azure devops build.Please let me know if anyone have solution for this issue.

from vsts-resharper-code-quality-task.

bobvandevijver avatar bobvandevijver commented on July 18, 2024

Currently, I use this, as I hit some errors with the NuGet restore combined with dotnet core projects.

screen shot 2019-01-23 at 14 04 34

I no longer have the script to create the output file, but I do still use $(Common.TestResultsDirectory)\$(Resharper.Output.File) as "Results output file path".

from vsts-resharper-code-quality-task.

SantGitHub0802 avatar SantGitHub0802 commented on July 18, 2024

The above solution still not working for me in Azure DevOps build pipeline.I am getting the same error.

from vsts-resharper-code-quality-task.

SantGitHub0802 avatar SantGitHub0802 commented on July 18, 2024

Hi,
I have also tried by writing power shell script to create empty outputfile.xml in specific path and verified the file exists in that path after that.It works well.Then specified the same path in Results path. But after then, ReSharper throws the same error "path does not exists" by saying the same path i created.
Please provide me some solution to resolve this issue.

from vsts-resharper-code-quality-task.

jcast07 avatar jcast07 commented on July 18, 2024

Hi,
Is the problem described above due to .Net Core? I tried using PowerShell scripts to do the inspection, since I am getting the same error as others and got the following error:
The default XML namespace of the project must be the MSBuild XML namespace.....

Has anyone found a solution.

from vsts-resharper-code-quality-task.

bobvandevijver avatar bobvandevijver commented on July 18, 2024

I cannot create a complete export due to configuration and overhead reasons, but this is what works for me on several .NET Core 2.2 projects at this moment.

The configuration is the same as I posted earlier, which contain the default 'Use .NET Core SDK' and 'dotnet restore' tasks. But, make sure to use the Hosted VS2017 runner for your configuration, as it has the required dependencies for the ReSharper tooling to work.

Below is the full configuration export of the ReSharper task:

steps:
- task: alanwales.resharper-code-analysis.custom-build-task.ResharperCli@1
  displayName: 'Resharper Code Quality Analysis'
  inputs:
    SolutionOrProjectPath: '$(solution.file)'
    ResultsOutputFilePath: '$(Common.TestResultsDirectory)\$(Resharper.Output.File)'

from vsts-resharper-code-quality-task.

jcast07 avatar jcast07 commented on July 18, 2024

@bobvandevijver thanks, but I can only use a self hosted agent. Do you know what are the required dependencies?

from vsts-resharper-code-quality-task.

jcast07 avatar jcast07 commented on July 18, 2024

Hi,

I was able to solve my issue by installing Visual Studio 2017 on the machine running the self hosted agent.

from vsts-resharper-code-quality-task.

alanwales avatar alanwales commented on July 18, 2024

I just had a project where we use the Yaml pipelines so had a chance to fix this issue finally.

The issue is that the .Net Core installer task installs the .Net Core SDK in a location which the Resharper Command-Line Tooks cannot resolve. You will need to add the "MSBuildSDKsPath" environment variable to the task as shown in the Yaml sample on https://marketplace.visualstudio.com/items?itemName=alanwales.resharper-code-analysis

env: MSBuildSDKsPath: '$(Agent.ToolsDirectory)/dncs/$(DotNet.Sdk.Version)/x64/sdk/$(DotNet.Sdk.Version)/Sdks'

The task is working with the latest .net core 3.0 preview

from vsts-resharper-code-quality-task.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.