List Defination Solution Scope
Hello
I have created a Wsp for List definition and I want to install list definition to a particular site collection.
So when deploying the package I use following command where url is passed as parameter (http://localhost:portnumber)
stsadm -o deploysolution -name %solutionName%.wsp -immediate -allowgacdeployment -allowCasPolicies -url %url% -force
but it gives me a error saying
This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application.
I have searched google and the workaround was to remove url part from above command, when I do that it works fine, but its installs globally, which I want to avoid.
I want it to be installed on a perticulart site collection.
I tried deploying package through central admin but here It says solution Deploys globally
How to deploy list definition it to a particular site collection?
Solution File xml
<?xml version="1.0" encoding="utf-8" ?>
<Solution xmlns="http://schemas.microsoft.com/sharepoint/"
SolutionId="F3709C7D-5E28-490b-8C96-7F6B425AA96B"
DeploymentServerType="WebFrontEnd"
ResetWebServer="FALSE">
<FeatureManifests>
<FeatureManifest Location="HYSCaseStudyMaster\feature.xml"/>
</FeatureManifests>
<TemplateFiles>
<TemplateFile Location="HYSCaseStudyMaster\HYSCaseStudyMasterListTemplate\AllItems.aspx"/>
<TemplateFile Location="HYSCaseStudyMaster\HYSCaseStudyMasterListTemplate\DispForm.aspx"/>
<TemplateFile Location="HYSCaseStudyMaster\HYSCaseStudyMasterListTemplate\EditForm.aspx"/>
<TemplateFile Location="HYSCaseStudyMaster\HYSCaseStudyMasterListTemplate\ListDefinition.xml"/>
<TemplateFile Location="HYSCaseStudyMaster\HYSCaseStudyMasterListTemplate\NewForm.aspx"/>
<TemplateFile Location="HYSCaseStudyMaster\HYSCaseStudyMasterListTemplate\schema.xml"/>
</TemplateFiles>
Feature file XML
<?xml version="1.0" encoding="utf-8"?>
<Feature Id="7B5C9471-FCB6-4b2a-BBFE-44711B5B47EF"
Title="HYSCaseStudyMaster"
Scope="Site" Description="Feature
for creating HYS Case Study Master List."
Version="1.0.0.0"
Hidden="FALSE"
xmlns="http://schemas.microsoft.com/sharepoint/"
>
<ElementManifests>
<ElementManifest Location="HYSCaseStudyMasterListTemplate\ListDefinition.xml" />
<ElementFile Location="HYSCaseStudyMasterListTemplate\schema.xml" />
<ElementFile Location="HYSCaseStudyMasterListTemplate\AllItems.aspx" />
<ElementFile Location="HYSCaseStudyMasterListTemplate\DispForm.aspx" />
<ElementFile Location="HYSCaseStudyMasterListTemplate\EditForm.aspx" />
<ElementFile Location="HYSCaseStudyMasterListTemplate\NewForm.aspx" />
</ElementManifests>
</Feature>
Any help would be appreciable
Regards
Manish
June 8th, 2010 2:16pm
Hi,
Add the safe control entry in solution.xml as follows: By adding this safecontrol entry , you are actually telling sharepoint to which web.config file to merge the <safecontrol> elements and therefore -url parameter must be specified.
PLEASE NOTE: If your solution does not have an assembly or if your solution contains workflows, then you
cannot specify the <var>url</var> parameter.
<
Assemblies>
Assembly
Location="Some.dll"
DeploymentTarget="GlobalAssemblyCache">
SafeControls>
SafeControl
Assembly="Some,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=c53741f4baf9bc23"
Namespace="SomeNamespace"
TypeName="*"
Safe="True"
/>
</
SafeControls>
</
Assembly>
Regards,
<
<
<
thanks for reply ,
regards
manish
Free Windows Admin Tool Kit Click here and download it now
June 8th, 2010 4:38pm
Yes , just add any strong named dll.Manvir
June 8th, 2010 4:42pm
something like:
<?xml version="1.0" encoding="utf-8" ?>
<Solution xmlns="http://schemas.microsoft.com/sharepoint/"
SolutionId="F3709C7D-5E28-490b-8C96-7F6B425AA96B"
DeploymentServerType="WebFrontEnd"
ResetWebServer="FALSE">
<FeatureManifests>
<FeatureManifest Location="HYSCaseStudyMaster\feature.xml"/>
</FeatureManifests>
<TemplateFiles>
<TemplateFile Location="HYSCaseStudyMaster\HYSCaseStudyMasterListTemplate\AllItems.aspx"/>
<TemplateFile Location="HYSCaseStudyMaster\HYSCaseStudyMasterListTemplate\DispForm.aspx"/>
<TemplateFile Location="HYSCaseStudyMaster\HYSCaseStudyMasterListTemplate\EditForm.aspx"/>
<TemplateFile Location="HYSCaseStudyMaster\HYSCaseStudyMasterListTemplate\ListDefinition.xml"/>
<TemplateFile Location="HYSCaseStudyMaster\HYSCaseStudyMasterListTemplate\NewForm.aspx"/>
<TemplateFile Location="HYSCaseStudyMaster\HYSCaseStudyMasterListTemplate\schema.xml"/>
</TemplateFiles>
<Assemblies>
<Assembly Location="Test.dll" DeploymentTarget="GlobalAssemblyCache">
<SafeControls>
<SafeControl Assembly="TestAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c53741f4baf9bc23" Namespace="TestNamespace" TypeName="*" Safe="True" />
</Assembly>
</Assemblies>
</Solution>
Manvir
Free Windows Admin Tool Kit Click here and download it now
June 8th, 2010 4:45pm
You should have this dll (Ex: Test.dll) physically present in GAC as well.Manvir
June 8th, 2010 4:50pm
i did nt have dll with me so i decided to shift it other wsp which had ddl
..it worked
thanks
regards
manish
Free Windows Admin Tool Kit Click here and download it now
June 8th, 2010 5:50pm