none
how to add user controls to a WSPBuilder project? RRS feed

  • Question

  • i found several references like this one that helped me get started with the correct way to build and deploy SharePoint Features. right now, i have a WSPBuilder project that has a master page. it builds successfully, and it successfully deploys itself to my sharepoint collection.

    the next step is to add some custom user controls which are referenced in the master page that i have in this feature. there are two user controls, which i have manually been registering in the GAC and adding to my sharepoint site's web.config SafeControl list. also i have a silverlight control that needs to get in there, as well as some other changes to the web.config that need to be made when this feature is activated/deactivated (references to ASP.NET 2.0 AJAX Extensions, etc).

    can anyone direct me to a decent reference/resource for this sort of thing?

    thanks in advance.
    Monday, November 10, 2008 8:02 PM

Answers

  • Solution deployment's manifest.xml supports changes to web.config (SafeControl) and GAC deployments. See the snippet below:
    This is taken from :
    http://msdn.microsoft.com/en-us/library/aa543741.aspx
    <Solution SolutionId="4AFC1350-F354-4439-B941-51377E845F2B" xmlns="http://schemas.microsoft.com/sharepoint/">
    <FeatureManifests>
    <FeatureManifest Location="FeatureLibrary\feature.xml"/>
    </FeatureManifests>
    <TemplateFiles>
    <TemplateFile Location="ControlTemplates\Featurelibraryform.ascx"/>
    </TemplateFiles>
    <RootFiles>
    <!-- These files go into the 12\ directory and can be used for Web services and global resources -->
    <RootFile Location="ISAPI\MyWebService.asmx">
    </RootFiles>
    <Assemblies>
    <Assembly  DeploymentTarget="GlobalAssemblyCache"
    Location="ms.samples.sharepoint.myFeature.dll"/>
    </Assemblies>
    </Solution>

    I am not aware of any other changes out of the box in web.config other than safecontrol entries. For other entries you can do it via code in featureActivating event.

    --
    Madhur


    http://blogs.msdn.com/mahuja | Please mark the replies as answers if they help
    Monday, November 10, 2008 8:17 PM
  • thank you for the reply!

    i found that information for manually creating the solution, however that is something that WSPBuilder does for you. what i was really after was documentation for WSPBuilder... which I found is installed by default here: 

    C:\Program Files\WSPTools\WSPBuilderExtensions\Documentation



    Tuesday, November 11, 2008 1:55 PM

All replies

  • Solution deployment's manifest.xml supports changes to web.config (SafeControl) and GAC deployments. See the snippet below:
    This is taken from :
    http://msdn.microsoft.com/en-us/library/aa543741.aspx
    <Solution SolutionId="4AFC1350-F354-4439-B941-51377E845F2B" xmlns="http://schemas.microsoft.com/sharepoint/">
    <FeatureManifests>
    <FeatureManifest Location="FeatureLibrary\feature.xml"/>
    </FeatureManifests>
    <TemplateFiles>
    <TemplateFile Location="ControlTemplates\Featurelibraryform.ascx"/>
    </TemplateFiles>
    <RootFiles>
    <!-- These files go into the 12\ directory and can be used for Web services and global resources -->
    <RootFile Location="ISAPI\MyWebService.asmx">
    </RootFiles>
    <Assemblies>
    <Assembly  DeploymentTarget="GlobalAssemblyCache"
    Location="ms.samples.sharepoint.myFeature.dll"/>
    </Assemblies>
    </Solution>

    I am not aware of any other changes out of the box in web.config other than safecontrol entries. For other entries you can do it via code in featureActivating event.

    --
    Madhur


    http://blogs.msdn.com/mahuja | Please mark the replies as answers if they help
    Monday, November 10, 2008 8:17 PM
  • thank you for the reply!

    i found that information for manually creating the solution, however that is something that WSPBuilder does for you. what i was really after was documentation for WSPBuilder... which I found is installed by default here: 

    C:\Program Files\WSPTools\WSPBuilderExtensions\Documentation



    Tuesday, November 11, 2008 1:55 PM