Problem description:
A solution containing contenttype is deployed in the test environment. After the content is modified in vs2010, you want to redeploy the solution, but you cannot deploy it either:
The Error Log content is as follows:
Spexception thrown: Message: Find the content type with ID 0x0100983a544ebe5040c28c797562907c29f2 defined in feature {b7edbfe2-c02e-4560-b314-b23c7b049d10} in the current site set or subsite .. STACK: in Microsoft. Sharepoint. Utilities. sputility. Duplicate (uint32 tagid, ulscat tracecategory, string resourceid, object [] resourceargs) in Microsoft
I checked the information and said it was necessary to join.Overwrite = "true"After the test, it is found that if you joinOverwriteThen there will be no problem later.
However, this is only effective for those added at the beginning. If an error is reported and then added, the following error will be reported during activation:
An error occurred in the deployment step "Activate function:
This comrade encountered the same problem with me: http://www.go4answers.com/Example/missing-content-types-central-128297.aspx
Solution:
Finally, combine the following two articles to solve the problem:
I did not understand the reason
Article 2 solution: delete a database
The procedure is as follows:
1. SQL queries the previously deployed contenttype
SELECT [SiteId]
,[Class]
,[Scope]
,sys.fn_varbintohexstr([ContentTypeId]) as CT
,[Version]
,[NextChildByte]
,[Size]
,[Definition]
,[ResourceDir]
,[IsFromFeature]
FROM [WSS_Content].[dbo].[ContentTypes]
where (sys.fn_varbintohexstr(ContentTypeId) LIKE '0x0100983a544ebe5040c28c797562907c29f2%')
2. Modify the isfromfeature field to 0.
Update [WSS_Content].[dbo].[ContentTypes]
SET [isfromFeature]= 0
where (sys.fn_varbintohexstr(ContentTypeId) LIKE '0x0100983a544ebe5040c28c797562907c29f2%')
3. NoOverwrite = "true" solution re-deployment. An error is reported at this time, but the contenttype has been deployed. Locate the deployed content type in website settings and delete it:
4. Return the SQL query. The result is empty.
5. Next, add contenttype in vs2010Overwrite = "true"After redeployment, the solution should be deployed later and no error will be reported.
Remarks: addOverwrite = "true"The definition field in the database table has a value. I wonder if the system determines whether the value can be rewritten based on this.
3. NoOverwrite = "true" solution re-deployment. An error is reported at this time, but the contenttype has been deployed. Locate the deployed content type in website settings and delete it:
4. Return the SQL query. The result is empty.
5. Next, add contenttype in vs2010Overwrite = "true"After redeployment, the solution should be deployed later and no error will be reported.
Remarks: addOverwrite = "true"The definition field in the database table has a value. I wonder if the system determines whether the value can be rewritten based on this.