I know it's quite an old question but if someone faces this then follow the below steps :
While creating a NuGet package, add a tools folder and add a file named: install.ps1
Write below PowerShell commands which define the project requirement, In my case, I had to add EmbedInteropTypes: false for SapROTWr library.
param($installPath, $toolsPath, $package, $project)
$project.Object.References | Where-Object { $_.Name -eq "Interop.SapROTWr" } | ForEach-Object { $_.EmbedInteropTypes = $false }
Now add that package to your project and checkout the properties.