I have a solution with multiple unit tests projects.
And for code coverage i am using JetBrains dotCover
So the goal here is to exclude the Migrations folder
I have added a runsettings file named .runsettings in the root of the test project
<Functions>
<Exclude>
<Function>^GF.Infrastructure\.Migrations\..*</Function>
</Exclude>
</Functions>
however the Migrations namespace still appears in the coverage results, and i have to manually exclude it :
You can also add new runtime filters right from the Unit Test Coverage: open the context menu for a desired node and then select Exclude and Create Runtime Coverage Filter.
Visual Studio
Go to ReSharper | Options | dotCover | Filtering and add an entry to Do not analyze code in: