first you need to install the spire package form manage packages if available else you need to find a nupkg and install it that is when you can invoke it using invoke code and make it run
Also clauses like import or using and class are not supported in invoke code it is to plainly write a code and run it
cheers