In .NET Core 2.1.200, WinSCPnet.csproj.nuget.g.targets is created in a correct location, so removing the hack from d49ae8072b0.
On the other hand this version issues warning about BaseIntermediateOutputPath. For VS build, we can fix it by adding Directory.Build.props with MSBuildProjectExtensionsPath.
But for command-line build, it does not work. There we simply fix it by using the default output paths.
Source commit: 03ea6eaafcc207b2709cac63c014634d44ca14a0