Build/Test Issues

NCrunch not respecting FilesExcludedFromAutoBuild config option

Started by james on 1,651 views

Hi

I may be configuring things wrongly but I've not been able to find adequate documentation

I'm using ApprovalTests and have the following configuration:

// TestProject.v3.ncrunchproject

<ProjectConfiguration>
  <Settings>
    <FilesExcludedFromAutoBuild>
      <Value>*.received.txt</Value>
    </FilesExcludedFromAutoBuild>
...


However, the tests still continuously trigger with no changes to any code files and the log output from NCrunch has the following lines repeated over and over.

[PID:48640 17:23:49.3839 ?-21] Publishing Event: [FsFileCreatedEvent:TestProject\TestProject.csproj:C:\...\TestProject\_approvals\TestClass.TestMethod.received.txt]
[PID:48640 17:23:49.3839 ?-21] Event [FsFileCreatedEvent:TestProject\TestProject.csproj:C:\...\TestProject\_approvals\TestClass.TestMethod.received.txt] is being published on thread CoreThread to subscriber: ProjectSynchronisationBuffer.
[PID:48640 17:23:49.3839 ?-21] Event [FsFileCreatedEvent:TestProject\TestProject.csproj:C:\...\TestProject\_approvals\TestClass.TestMethod.received.txt] is being published on thread UIThread to subscriber: SharedEventPump.
[PID:48640 17:23:49.3839 Core-24] Event [FsFileCreatedEvent:TestProject\TestProject.csproj:C:\...\TestProject\_approvals\TestClass.TestMethod.received.txt] is being processed on Core thread with subscriber: ProjectSynchronisationBuffer.
[PID:48640 17:23:49.3839 ?-75] Publishing Event: [FsFileDeletedEvent:TestProject\TestProject.csproj:C:\...\TestProject\_approvals\TestClass.TestMethod.received.txt]
[PID:48640 17:23:49.3839 ?-75] Event [FsFileDeletedEvent:TestProject\TestProject.csproj:C:\...\TestProject\_approvals\TestClass.TestMethod.received.txt] is being published on thread CoreThread to subscriber: ProjectSynchronisationBuffer.
[PID:48640 17:23:49.3839 ?-75] Event [FsFileDeletedEvent:TestProject\TestProject.csproj:C:\...\TestProject\_approvals\TestClass.TestMethod.received.txt] is being published on thread UIThread to subscriber: SharedEventPump.
[PID:48640 17:23:49.3839 Core-97] Event [FsFileDeletedEvent:TestProject\TestProject.csproj:C:\...\TestProject\_approvals\TestClass.TestMethod.received.txt] is being processed on Core thread with subscriber: ProjectSynchronisationBuffer.


Docs don't suggest how to set the exclude pattern

https://www.ncrunch.net/documentation/reference_project-configuration_files-excluded-from-auto-build

I've tried:

  • *.received.*
  • *.received.txt
  • **/*.received.*
  • **/_approvals/*.received.*


The first two don't exclude the change tracking of these files as shown above. The second 2 produce the following error message:

Please enter a valid wildcard expression (i.e. '*.txt')


Thanks for any assistance on this.

James
Thanks ever so much. I did a quick search on the forums for "ApprovalTests" but didn't find that post.

It may be worth updating the documentation page for the FilesExcludedFromAutoBuild option? a) to mention what wildcard syntax is valid and b) to warn about the new project type auto including files.

Thanks again :)

Post a reply

Log in to reply.