I'm using DotCover to calculate my code coverage %. My contract project is compiled into .net Framework code and .net core.. Since my unit tests are in .net code the code coverage for the contract project in .net framework is 0%.
How do I filter out the .net framework code? Can't find any DotCover filter to do it.

I would suggest you look at
ReSharper | Options | dotCover | Filteringpage, where you can set up some runtime coverage filters or coverage result filters.