views:

13

answers:

2

I have a Sharepoint 2010 feature that contains several custom actions in it. I added a Custom Control to the elements xml and a new ascx file in the controltemplates folder. Pretty simple. However, I can see that the ascx file is not inside the bundle file after I package the solution and get the WSP distribution file. The modifications to the elements.xml file are there though.

I did not create the original solution. Is there some configuration I'm missing in order to get the ascx file bundled??

+1  A: 

Two things to check:

  1. In the Properties of the project, make sure that Sandboxed Solution is false.
  2. In the Properties of the ascx, make sure that Deployment Type is TemplateFile.

Also, how was the ControlTemplates folder created? Did you create it manually or was it created automatically via Add > New Item > SharePoint > 2010 > User Control? If it was the former, you might want to try creating the user control through Add New Item.

Rich Bennema
+1  A: 

I found that the error was that the manifest file --that ussually is generated automatically by Visual Studio-- was edited manualy by the person who created the project. So, the new files I added into the solution were excluded from it. I changed back the configuration to maintain the file automatically again and it worked.

tou