Alright. I have just made changes to a custom webpart that was already deployed to Sharepoint. I made a few deploys, some changes... and suddenly, a code that was in the front-end of the webpart didn't update. I found it strange, and I added a comment to the HTML code.
Guess what? I made another deployment, and I still can't find that comment on the source code. Then, I proceeded to try to get this exactly same code to another machine, and deploy it in the same way I tried to deploy - create the WSP in Visual Studio, and deploy it with Sharepoint 2013 management shell.
The deploy was successfull, and I did find my changes in the HTMl code and in the JS functions.
I have already tried to retract the solution, deploy with visual studio, delete my site collection, recreate it, generate a new WSP file, and deploy it... nothing worked on my machine. On other machines, it all runs well. Even if I generate a new package on these machines with the same solution.
What's going on? Is there any way I can solve this?
EDIT: I tried doing as Amal suggested, to no avail. I tried once more generate a new deploy on a different machine, and the changes went on all fine. What can I try next?
I am still trying to gather more information on the problem. I saw similiar problems in Stack Overflow but with sharepoint 2010. So I tried updating a JS file with one space more, and generating a new WSP file. I opened the file, and... the timestamp date to 08/12/2014. And I have just updated it!
Why is Visual Studio generating the WSP file with this old solution? How can I solve this?
So, after reading your comments, and some forums and consulting the seniors from here... I did not managed to solve the problem. Full steps:
- Deleting the site collection, web application, and remaking the deployment using Visual Studio.
- Same as above, but with Sharepoint Management Shell.
- Same as above, but stopping all services, restarting then one by one, and deleting the sharepoint cache before that.
- Restarting the services and re-deploying;
- Checked the WSP and insert unto it manually a different version of my script;
- Restarted the vm, database, host machine.
- Cleared the SP solution in visual studio, deleting obj, pkg, and even deleting visual studio cache.
- Manually adding the solution with powerShell, then activating the features.
- Simple Deployment in visual studio, after it was done, deactivated features, deleted cache, stopped timer service, reactived then.
Well... nothing worked. I uploaded the changes to my git repo, then I have restored my VM to a previous point. Guess what... It worked again.
To this date I don't know what happenned. If someone look this question for future reference, I could not find a solution - if you meet this problem yourself, it would be wise to not waste much time on it, if you use a simple and fast solution, like I did. If someone find an answer, do answer here for future reference.