Domanda

I'm testing a new feature I'm developing. I have ULS logging in the feature.

I deployed it to a production server after testing in the dev environment was complete and users then requested a few changes. I made the changes, retracted the solution and then ran the Remove-SPSolution and Add-SPSolution commands to remove the old solution and re-add the newly compiled replacement (the changes were working correctly in development).

After redeploying in production, the new code doesn't seem to be there as all the logs are what the first version was outputting; I changed the layout between versions, so it's obvious that I'm not getting any of the new logs.

Is there a cache of solutions that I have to remove the old one from first? I've also tried doing an Update-SPSolution but that doesn't seem to have made any difference.

È stato utile?

Soluzione

I had to do a combination of things to get this working, and I'm still not confident in Visual Studio for the deploy process.

This link showed a known issue with Visual Studio building SharePoint solutions where sometimes the old code (which is no longer in any source files) still gets used during the build process. The only way I could reliably get a full build each time I wanted one was to restart Visual Studio, then Clean the project, then rebuild it.

This link shows a different issue where some debug builds are using old code. There are many suggestions here of various fixes, none of which worked for me but it's worth having on file in case someone else needs them.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top