The first command doesn't quite create a spec file the way you think it does. The spec command does not generate the files node, as a result the file tree is copied as-is to your package without correctly placing them in the right package directories.
So in this case, chances are MyAssembly.dll is getting copied to the root of your package instead of the lib directory. What you need to do is specify a files node in your spec file and tell it to target lib directory in your package.
<file src="MyAssembly.dll" target="lib" />
Alternatively if you already have files copied to the right directories based on convention, nuget pack should work just fine.