Thursday, February 14, 2013

SharePoint 2010

Problem
The located assembly's manifest definition does not match the assembly reference sharepoint 2010 -

Solution
IISRESET

----------------------------------------------------------------------------------------------------------------------

Problem
System.ArgumentException: Feature 'df48393c-951b-4543-ae4b-0f3b628595e0' for list template '1012' is not installed in this farm.  The operation could not be completed.    at Microsoft.SharePoint.SPFeatureManager.<>c__DisplayClass19.<GetFeatureRootAndListSchemaPaths>b__18()

Solution
The above problem states that the list instance is missing the list definition/list template.

Scenario - 
Step1 - I have created a list definition in my project and deployed.
Step2 - Created list instance through UI and added few items.
Step3 - List Feature ID is - df48393c-951b-4543-ae4b-0f3b628595e0
The above 3 steps was done in old solution.

Now we have changed solution structure and we create a new solution. during deployment of new solution it will retract the the old soution and deploy the new soution.

Once we deployed the new soution and when we try to click on the existing list instance we will get the above error.

Below is the step to fix the above error.
Step 1 - In the new list template we need to use the exisitng list template ID

<ListTemplate
Name="SampleListDefinition"Type="1012" ----> List Template IDBaseType="0"OnQuickLaunch="TRUE"SecurityBits="11"Sequence="410"DisplayName="SampleListDefinition"Description="My List Definition"Image="/_layouts/images/itgen.png"/>
Step 2 - We no need to change anything in schmea.xml file.
Step 3 - Here is the tricky part. The feature id which we are using for this list should be the same as existing feature id that is "df48393c-951b-4543-ae4b-0f3b628595e0". We should not keep the new feature id.

When we deploy the solution our list instance will point to the correct list template. :)

No comments:

Post a Comment