How to exclude files from .Net inspections

I've tried to use custom settings with Skip files
But this does not affect anything

 This makes my build actually 10x times slower

 

 

14 comments

Hello Vilen,

ReSharper Command Line Tools as well as ReSharper do not analyze *.png, *.jpg and *.less files so adding them to the list can't affect anything.  

Please could you specify the structure of the solution where you experience the issue? Do it contain "bower_components" or "node_modules" folders?

Thanks!  

0

There is no these folders in my solution. TC log shows that it DOES try to analyze the files

0

I am also experiencing the same issue with TeamCity 10.  TeamCity 10 is not skipping anything that I specified.

Below is an example from the TC build log.

[15:10:38][Step 5/5] Analyzing kendo.all-vsdoc.js
[15:10:38][Step 5/5] Analyzing kendo.all.min.intellisense.js
[15:10:38][Step 5/5] Analyzing kendo.all.min.js
 
I have the entire kendo folder set to be skipped and I also added a file kendo.*.js file mask.
0

Hello Jeremy,

In ReSharper 2016.3 as well as in InspectCode 2016.3 we implemented a new setting in ReSharper Options - ReSharper | Options | Code Editing | Third-Party Code | "Skipped Code". Please add these files/folders to the list and run InspectCode on new settings file once again.

Thanks! 

0

Hey Alexander,

I'm using Inspect Code 10.0.2 ([Step 5/5] JetBrains Inspect Code 10.0.2), because I have 10.0.2 installed in Visual Studio 2015.  I have added all the elements that I want skipped to ReSharper | Options | Code Inspection | Elements to skip, but TeamCity (10.0.3 build 42434) is still analyzing every file.

0

Hey Alexander,
Any update on this issue? Should I submit a bug?

0

I'm having the same issue, but might have found the cause: my dot settings file was not in the root of my checkout directory.

I've set the path now and run again to see if this fixes the issue. I'll report back once TeamCity is done, which takes quite some time for us at the moment (hence the optimization attempts). Might the same be the case for you Jeremy? 

 

0

Same here "Skipped elements" doesn't work.

 

0

> Version:1.0 StartHTML:000000285 EndHTML:000003594 StartFragment:000003454 EndFragment:000003472 StartSelection:000003454 EndSelection:000003472 SourceURL:https://teamcity-support.jetbrains.com/hc/en-us/community/posts/206510169-How-to-exclude-files-from-Net-inspections?page=1 How to exclude files from .Net inspections – TeamCity Support | JetBrains

 
Your settings doesn't work either.

 

0

@Mateusz

What type of files have you added to ReSharper | Options | Code Editing | Third-Party Code | "Skipped Code"? It affects C++, JavaScript, TypeScript, CSS, HTML and JSON files only.

Thanks! 

0

I didn't use file filter. I've pointed folders with *.cs files in subfolders. In R# it works in inspectcode it dont. Inspectcode.exe is pretty unconfigurable tool.

0

@Mateusz

I will try once again. ReSharper | Options | Code Editing | Third-Party Code | "Skipped Code" option does not affect .cs files or folders with .cs files, at all. So it does not work even in ReSharper. So, it does not work in InspectCode either. 

Thanks! 

0

Hi,

How to exclude/skip few files/folders (web.config, .xml , App_data(folders) ..etc) when creating package? I don't          want this files in my package. 

      For this I have specified Artifact paths rule as ( -:  API\CC.API\CC.API\Web.config => Api.csproj.zip ), but no luck


      How I have to specify to skip the above files/folders in my Artifact paths: 

   I have gone through Build log, First Team City is creating package. I don't want this (web.config, .xml ..etc) files in my package. From package it is deploying to respective environment.

[VSMSDeploy] Package "Api.csproj.zip" is successfully created as single file at the following location: file:///C:/TeamCity/buildAgent/work/4488f0f366ca5251/Api/DeploymentArtifacts/_PublishedWebsites/Api.csproj_Package
[18:24:32][VSMSDeploy] To get the instructions on how to deploy the web package please visit the following link:
[18:24:32][CallTarget] GenerateSampleDeployScript
[18:24:32][GenerateSampleDeployScript] GetPublishingLocalizedString
[18:24:32][GetPublishingLocalizedString] Sample script for deploying this package is generated at the following location: C:\TeamCity\buildAgent\work\4488f0f366ca5251\Api\DeploymentArtifacts\_PublishedWebsites\Api.csproj_Package\Api.csproj.deploy.cmd For this sample script, you can change the deploy parameters by changing the following file: C:\TeamCity\buildAgent\work\4488f0f366ca5251\Api\DeploymentArtifacts\_PublishedWebsites\Api.csproj_Package\Api.csproj.SetParameters.xml
[18:24:32][Api\Api.csproj.teamcity] MSDeployPublish
[18:24:32][MSDeployPublish] GetPublishingLocalizedString
[18:24:32][GetPublishingLocalizedString] Start Web Deploy Publish the Application/package to http://xxx.xx.x.45/MSDEPLOYAGENTSERVICE ...
[18:24:32][MSDeployPublish] VSMSDeploy
[18:24:32][VSMSDeploy] Starting Web deployment task from source: package(C:\TeamCity\buildAgent\work\4488f0f366ca5251\Api\DeploymentArtifacts\_PublishedWebsites\Api.csproj_Package\Api.csproj.zip) to Destination: auto().
 
It is replacing the web.config file, so that I lost my required ( username, password's and required ingo to login the application)info.

 

0

Hi Pnarendra,

Please stop asking new, unrelated questions in old threads to unrelated topics. Every time you send an email to an existing thread, all participants can be notified about your unrelated question, which can be annoying for other users. If you have new questions, please create new threads for them.

To your problem, artifact paths are used to publish internally for teamcity, that is, what in teamcity is shown as "artifacts" once a build is finished and what will be available for other builds as artifact dependencies. It seems that you are using VS in a deploy profile to create the packages. That tool defines under *your* project how to configure the package, so it is in your VS project where you need to change and/or filter this files. This has nothing to do with teamcity, so I'd recommend requesting help from the VS documentation or community.

0

Please sign in to leave a comment.