We have added a VS module and foll. is the elements.xml:-
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="Module1" Url="Shared Documents" RootWebOnly="True" Path="Module1" >
<File Url="Sample.txt" Type="GhostableInLibrary"/>
</Module>
</Elements>
Since RootWebOnly=true, the file gets deployed only to the RootWeb. Now, if we remove this, then, still the file gets deployed only to root web.
How to deploy this to all webs in the sitecollection?
If we set url to
http://serverurl:port/subsite
and set RootWebOnly="True", then the file is not deployed anywhere. If we set set RootWebOnly="False", then also the file is not deployed any where.If we set url to
http://serverurl:port/
and set RootWebOnly="True" or "False", then the file is deployed to root web.