'Importing exported project templates in Visual studio does not restore packages

I created an project template according to microsofts docs. The project itself requires 3 packages that I installed from Nuget. However upon importing the project/creating a new project with the template results in the packages not being found Nuget settings are set to "download missing packages" and if I hover my using statements, I only get the option to remove them, not download them. According to Package manager, the packages are restored but the compiler cannot even find for example the System namespace.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source