From here, the best approach is to transfer things over to your sample project, one step at a time.
For example, start by just copy/pasting your entire list of Nuget package references into the test project, then see if it still works. If not, we know it's something in the Nuget packages .. if it does work, it must be something else. So from there, you start transferring project references or source files.
It can sometimes be a time consuming approach, but the good thing about it is that you'll always identify the point of difference and therefore the reason for the failure. We use this approach very often in developing the product as the platform itself isn't always very good in its error reporting in the areas we've integrated with it.