I have a ashx file that I need to get into the layouts directory during a solution deployment. I have this file in a mapped folder in VS2010 and works fine in my development environment. When I package the project, I can see that the file ends up in the wsp. When I move to another server, the files in the mapped folder are not getting added to the layouts directory. This contradicts what msdn says should happen. Is there something I am missing?


Both answers below are correct based on the information I provided. I discovered that the reason my files werent being added after a full retraction and deployment was because they were not being added to the manifest. I made an unnecessary manual edit to the package.template.xml file which prevented the new files I added to the mapped folder from the manifest. I discarded my manual changes and let the designer add the files for me. The files now appear in the layouts folder.

2 Answers 2


Try doing a full retract on the solution. I'm assuming you are using Update-SPSolution when you are deploying. In the help to Update-SPSolution it states that "If files and features are different, the solution must be retracted and redeployed by using the Uninstall-SPSolution and Install-SPSolution cmdlets, respectively."

p.s. This should maybe be a comment, but I'm not there yet.

  • This surely qualifies as an answer :) Commented Nov 22, 2013 at 6:53

as beavel said,

you should retract the full wsp (removing it from central admin) and then adding it back again!

If your using visual studios deployment than make sure you clean the solution re-build and deploy! also make sure the the file is pointing to the correct location! click on the offending file and then check the properties panel. under 'deployment location' you should see that its mapped to the correct location.... somthing on the lines of {SharePointRoot}\Template\Layouts\

sounds like to me that its not using the correct wsp version but rather using the older version wsp and hence why you see the file/folder within the wsp but not reflecting on the hive! make sure your referencing the correct wsp!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.