Comments (14)
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.
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.
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.
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.
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:
- https://resharper-support.jetbrains.com/hc/en-us/community/posts/360000512619-Resharper-CLT-inspectcode-on-net-core-project
- https://youtrack.jetbrains.com/issue/RSRP-470097
For now, I've solved it for my dotnet core 2.1 project by using the "Hosted VS2017" agent, with the steps below:
from vsts-resharper-code-quality-task.
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.
Currently, I use this, as I hit some errors with the NuGet restore combined with dotnet core projects.
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.
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.
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.
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.
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.
@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.
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.
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)
- CLI is downloaded into artifacts folder
- Support for **\*.sln HOT 1
- DotSettings file not being picked up when running inspectcode.exe
- Resharper Code Quality Analysis in Azure Dev Ops
- Links to the images in overview.md are broken HOT 1
- Additional Parameter are not picked up correctly HOT 1
- Deprecated task warning
- Code Quality Analysis hangs
- Issue with additionalArguments HOT 5
- Mapping severity types is very slow. Rewrite it to use a dictionary. HOT 1
- Task fails when solution path contains space HOT 1
- Task gives errors/warnings with angular projects
- .NET 5 Scanner can't resolve symbols for installed packages
- Azure DevOps with cached CLT throws "This Master Assembly Binder does not know how to load the assembly."
- Download settings file from a URL
- naming rules are not picked up correctly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vsts-resharper-code-quality-task.