I know Since the release of msbuild 15 (vs 2017) that NuGet is now fully integrated into MSBuild.
I have a nuspec file with defining variables of package properties
As has been mentioned in the comments, you no longer need a Nuspec file as most aspects can be controlled via properties in the csproj file or additional metadata on items (e.g. if you need additional content).
If you do need a nuspec file for some reason, you need to provide the variables for substitution yourself. You can do this in a target inside the csproj file like this:
$(NuspecProperties);id=$(AssemblyName)
$(NuspecProperties);config=$(Configuration)
$(NuspecProperties);version=$(PackageVersion)
$(NuspecProperties);description=$(Description)
$(NuspecProperties);authors=$(Authors)