You didn't clarify whether you're talking about an item or project template but I'm assuming a project template here. In that case it is literally just a zip file with the project file and source files inside it. You can unzip the contents into a new directory, fix up any substitution variables used (like the project name) and build and it is no different than when you do this manually.
Without seeing the project file contents we can only make some guesses as to what is going on.
- The project hasn't restored all the packages yet so you're seeing a temporal issue. If you build your code that problem would go away. If it doesn't then it isn't a restore issue.
- You are relying on a Nuget package that is no longer available (or was a pre-release).
- You changed the framework version from what the project originally targeted (either manually or via the project file properties).
You should be able to create a brand new project of the same type, replace the generated project file with whatever is in your project template file, copy over the source files and basically be in the same state as when the project template is used directly.
If you can post the project file contents and the actual error(s) you're seeing along with any other relevant information we might be able to provide more guidance.