Question: Right now I have a visual studio project which contains a custom content type that I made. It also contains all the necessary files for making a sharepoint solution (wsp) file and a script to generate this. 

Now, I would like to do 2 things. 

First, I'd like to create a custom display form for the content type and include it in my solution so that it is automatically deployed when I deploy my solution. How do I include this in my solution and make my content type use it?

Secondly, you can query this type with the CQWP. I've thought about exporting it, adding more common view fields, and then modifying the XSL that is used to render it. How do I include this into my solution so that it is also deployed. I know i can export the CQWP webpart once it's all setup and include it in my project as a feature. But what abuot the XSL?

Looking forward to see your suggestions, cheers.

Did as described in the first answer. Worked like a charm.

Answer: 
Use [STSDev](http://www.codeplex.com/stsdev) to create the solution package. 
That should help with creating the WSP. The custom form, CQWP webpart and the .xls file should also be deployable within the project.

To deploy the xslt, your feature will have an

`<ElementManifest Location="mywebpartManifest.xml">`

This then points to a files such as

```
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="Yourfile.xslt" Url="Style Library" Path="" RootWebOnly="TRUE">
    <File Url="yourfile.xslt" Type="GhostableInLibrary" />
  </Module>
</Elements>

```

for the webpart:

```
<Module Name="myWebpart" List="113" Url="_catalogs/wp" RootWebOnly="FALSE">
   <File Url="myWebpart.webpart" Type="GhostableInLibrary" />
</Module>

```

Now that file will need to be contained in the solution manifest.xml. This is done automatically from the STSDev project.

e.g.

```
<Resources>
    <Resource Location="SimpleFeature\Feature.xml"/>

```

The actual schemas are:

[Site](http://msdn.microsoft.com/en-us/library/aa544502.aspx)

[Solution](http://msdn.microsoft.com/en-us/library/ms442108.aspx)

[Feature](http://msdn.microsoft.com/en-us/library/ms414322.aspx)

[and a link to someone else with the issue](http://social.msdn.microsoft.com/Forums/en-US/sharepointecm/thread/335399ea-f07f-43a5-a4e2-21d88ba2743e/)
But where in the folder structure do you deploy the form and the .xsl to?