If any package reference is present under project reference that should not be present under package in test project dependency and the package version should be same as the project package version.
Spent lot of time and discovered the solution trying different options.
Thanks.