Ensure you have Sharepoint Powershell commands enabled
For that run following command
run following command (Replace mysolution.wsp with your solution name)
this helped to me.
If still not
then open your solution folder and delete files from bin,pkg and obj folders and do the above mentioned again.