I have created a .wsp file through Visual Studio which should contain a module with my page layouts I want to deploy. To do this I downloaded my page layout .aspx that was already created on my development environment site and stuck it in my PageLayouts module in VS (I also renamed it to .layout because I read somewhere SharePoint messes with .aspx files). I made sure the module is included in my feature and that the feature is scoped to Site, then published my .wsp file.
Then, over in my test environment, I copied the .wsp to C:\Deploy\Page_Layouts.wsp and ran the following command:
Add-SPSolution -LiteralPath C:\Deploy\Page_Layouts.wsp
Usually I would also run (for webparts):
Install-SPSolution -Identity Page_Layouts.wsp -AllWebApplications -GACDeployment -Force
but this gave me an error that the solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application. I'm not sure if it should be like that or not but at any rate I would expect to see my page layout in the master page gallery if this worked correctly.
If I try to deploy to my development environment directly through VS I get the following Error:
"Error occurred in deployment step 'Add Solution': Value does not fall within the expected range."
This is what my module currently looks like in Elements.xml in case anything in there could be causing it:
<Module Name="PageLayouts">
<File Path="PageLayouts\Three Columns Custom.layout" Url="/_catalogs/masterpage">
<Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;"/>
<Property Name="PublishingAssociatedContentType" Value=";#Article Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#" />
<Property Name="Title" Value="Three Columns Custom" />
<Property Name="MasterPageDescription" Value="Three column layout" />
</File>
</Module>